Issue 130934
Summary Warning in lld/COFF/Writer.cpp while building llvm
Labels lld
Assignees
Reporter anutosh491
    ```
│ │ $SRC_DIR/lld/COFF/Writer.cpp:1740:27: warning: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'long' [-Wsign-compare]
 │ │  1740 |   assert(coffHeaderOffset == buf - buffer->getBufferStart());
 │ │       |          ~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 │ │ $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)))
 │ │       |                            ^
 │ │ $SRC_DIR/lld/COFF/Writer.cpp:788:7: note: in instantiation of function template specialization '(anonymous namespace)::Writer::writeHeader<llvm::object::pe32plus_header>' requested here
 │ │   788 |       writeHeader<pe32plus_header>();
 │ │       |       ^
 │ │ $SRC_DIR/lld/COFF/Writer.cpp:1773:25: warning: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'long' [-Wsign-compare]
 │ │  1773 |   assert(peHeaderOffset == buf - buffer->getBufferStart());
 │ │       |          ~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 │ │ $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)))
 │ │       |                            ^
 │ │ $SRC_DIR/lld/COFF/Writer.cpp:1840:26: warning: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'long' [-Wsign-compare]
 │ │  1840 |          dataDirOffset64 == buf - buffer->getBufferStart());
 │ │       |          ~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 │ │ $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)))
 │ │       |                            ^
 │ │ $SRC_DIR/lld/COFF/Writer.cpp:1740:27: warning: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'long' [-Wsign-compare]
 │ │  1740 |   assert(coffHeaderOffset == buf - buffer->getBufferStart());
 │ │       |          ~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 │ │ $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)))
 │ │       |                            ^
 │ │ $SRC_DIR/lld/COFF/Writer.cpp:790:7: note: in instantiation of function template specialization '(anonymous namespace)::Writer::writeHeader<llvm::object::pe32_header>' requested here
 │ │   790 |       writeHeader<pe32_header>();
 │ │       |       ^
 │ │ $SRC_DIR/lld/COFF/Writer.cpp:1773:25: warning: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'long' [-Wsign-compare]
 │ │  1773 |   assert(peHeaderOffset == buf - buffer->getBufferStart());
 │ │       |          ~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 │ │ $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)))
 │ │       |                            ^
 │ │ $SRC_DIR/lld/COFF/Writer.cpp:1840:26: warning: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'long' [-Wsign-compare]
 │ │  1840 |          dataDirOffset64 == buf - buffer->getBufferStart());
 │ │       |          ~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 │ │ $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)))
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to