NetworkManager/m4
Thomas Haller 407a1f1e98
build: disable "-Wstringop-overflow" warning with LTO enabled
No amount of _Pragma was able to disable this warning.

    In function ‘strncpy’,
        inlined from ‘_nm_strndup_a_step’ at ./shared/nm-glib-aux/nm-macros-internal.h:1367:3,
        inlined from ‘nms_keyfile_nmmeta_check_filename’ at src/settings/plugins/keyfile/nms-keyfile-utils.c:61:0:
    /usr/include/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
      106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
          |          ^
    src/settings/plugins/keyfile/nms-keyfile-utils.c: In function ‘nms_keyfile_nmmeta_check_filename’:
    src/settings/plugins/keyfile/nms-keyfile-utils.c:44: note: length computed here
       44 |  len = strlen (filename);
          |
    lto1: all warnings being treated as errors

Oddly enough, gcc is still emitting the warning even with "-Wno-stringop-overflow",
but at least it doesn't break the build.
2020-08-17 15:20:08 +02:00
..
attributes.m4 build: import attributes.m4 from systemd 2016-06-03 22:19:37 +02:00
ax_lib_readline.m4 build: correct help message about missing readline + termcap libraries 2015-05-11 10:33:21 -05:00
compiler_options.m4 build: disable "-Wstringop-overflow" warning with LTO enabled 2020-08-17 15:20:08 +02:00
git-sha-record.m4 build: move detection of NM_GIT_SHA to separate "m4/git-sha-record.m4" 2016-09-14 14:11:07 +02:00
gnome-code-coverage.m4 build: disable lcov version check 2017-10-20 17:16:22 +02:00
introspection.m4 build: remove subshells and fix invalid test syntax 2020-04-20 08:54:38 +02:00
vapigen.m4 build: document defaults consistently 2019-04-16 15:57:20 +02:00