Commit ba93ecc
authored
[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 think1 parent 3321c2d commit ba93ecc
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2079 | 2079 | | |
2080 | 2080 | | |
2081 | 2081 | | |
2082 | | - | |
| 2082 | + | |
2083 | 2083 | | |
2084 | 2084 | | |
2085 | 2085 | | |
2086 | 2086 | | |
2087 | | - | |
| 2087 | + | |
2088 | 2088 | | |
2089 | 2089 | | |
2090 | 2090 | | |
| |||
0 commit comments