[all-commits] [llvm/llvm-project] ba93ec: [lld][MachO] Fix warning while building for wasm (...

Anutosh Bhat via All-commits all-commits at lists.llvm.org
Sun Jan 5 01:50:12 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ba93eccded30862969a3c5f547d837d6d102c863
      https://github.com/llvm/llvm-project/commit/ba93eccded30862969a3c5f547d837d6d102c863
  Author: Anutosh Bhat <andersonbhat491 at gmail.com>
  Date:   2025-01-05 (Sun, 05 Jan 2025)

  Changed paths:
    M lld/MachO/SyntheticSections.cpp

  Log Message:
  -----------
  [lld][MachO] Fix warning while building for wasm (#120889)

While building clang & lld against emscripten for wasm, I see the
following
```
 │ │ /home/runner/work/recipes/recipes/output/bld/rattler-build_llvm_1734801187/work/lld/MachO/SyntheticSections.cpp:2075:25: warning: comparison of integers of
 │ │  different signs: 'long' and 'const uint32_t' (aka 'const unsigned int') [-Wsign-compare]
 │ │  2075 |   assert(buf - bufStart == sectionSize &&
 │ │       |          ~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
 │ │ $BUILD_PREFIX/opt/emsdk/upstream/emscripten/cache/sysroot/include/assert.h:8:28: note: expanded from macro 'assert'
 │ │     8 | #define assert(x) ((void)((x) || (__assert_fail(#x, __FILE__, __LINE__, __func__),0)))
 │ │       |                            ^
 ```
 
 Casting `sectionSize` should be enough I think



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list