Skip to content

Commit 0d88733

Browse files
Adjust configure.sh to silence another set of protobuf compilation warnings (#1043)
Compilation with gcc 15.2 on Debian Linux results in some warnings coming from the Protobuf library: ``` inlined from 'bool google::protobuf::MessageLite::SerializePartialToZeroCopyStream(google::protobuf::io::ZeroCopyOutputStream*) const' at external/com_google_protobuf/src/google/protobuf/message_lite.cc:411:30: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:29:33: warning: 'void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)' specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=] 29 | return __builtin___memcpy_chk (__dest, __src, __len, | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ 30 | __glibc_objsize0 (__dest)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` This is difficult to address directly, so this PR adds a narrowly-scoped silencing flag to the compilation arguments. --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 1ac4bb8 commit 0d88733

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

configure.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,8 @@ write_bazelrc 'build --per_file_copt=external/.*[.]c$@-Wno-deprecated-non-protot
244244
write_bazelrc 'build --host_per_file_copt=external/.*[.]c$@-Wno-deprecated-non-prototype'
245245
write_bazelrc "build --per_file_copt=external/com_google_protobuf/.*@-Wno-unused-function"
246246
write_bazelrc "build --host_per_file_copt=external/com_google_protobuf/.*@-Wno-unused-function"
247+
write_bazelrc "build --per_file_copt=external/com_google_protobuf/.*@-Wno-stringop-overflow"
248+
write_bazelrc "build --host_per_file_copt=external/com_google_protobuf/.*@-Wno-stringop-overflow"
247249
write_bazelrc "build --per_file_copt=external/eigen/.*@-Wno-maybe-uninitialized"
248250
write_bazelrc "build --host_per_file_copt=external/eigen/.*@-Wno-maybe-uninitialized"
249251

0 commit comments

Comments
 (0)