about summary refs log tree commit diff
path: root/string/strncase_l.c
diff options
context:
space:
mode:
authorAdhemerval Zanella Netto <adhemerval.zanella@linaro.org>2023-07-21 09:18:17 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2023-07-24 15:26:17 -0300
commitc2dc8ab6a5a4e67f96ddd3f6bfdf2c991385ec38 (patch)
treeb234bb8e1be55c408188d848a1c69a19fc0ba735 /string/strncase_l.c
parent85ac7edcdf67010c223541936243427213ac87a6 (diff)
downloadglibc-c2dc8ab6a5a4e67f96ddd3f6bfdf2c991385ec38.tar.gz
glibc-c2dc8ab6a5a4e67f96ddd3f6bfdf2c991385ec38.tar.xz
glibc-c2dc8ab6a5a4e67f96ddd3f6bfdf2c991385ec38.zip
string: Fix tester with fortify enabled
If fortify is enabled, the truncated output warning is issued by
the wrapper itself:

In function ‘strncpy’,
    inlined from ‘test_strncpy’ at tester.c:505:10:
../string/bits/string_fortified.h:95:10: error: ‘__builtin_strncpy’
destination unchanged after copying no bytes from a string of length 3
[-Werror=stringop-truncation]
   95 |   return __builtin___strncpy_chk (__dest, __src, __len,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   96 |                                   __glibc_objsize (__dest));
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../include/bits/string_fortified.h:1,
                 from ../string/string.h:548,
                 from ../include/string.h:60,
                 from tester.c:33,
                 from inl-tester.c:6:
In function ‘strncpy’,
    inlined from ‘test_strncpy’ at tester.c:505:10:

Checked on x86_64-linux-gnu.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'string/strncase_l.c')
0 files changed, 0 insertions, 0 deletions