about summary refs log tree commit diff
path: root/stdlib/addmul_1.c
diff options
context:
space:
mode:
authorMartin Sebor <msebor@redhat.com>2017-11-15 17:39:59 -0700
committerFlorian Weimer <fweimer@redhat.com>2018-10-22 14:00:13 +0200
commite37ec9c813de3faeabc31d9ffc896ba45b4dfd5f (patch)
tree302a5a1d8fe3be622bffaf6da7e8fc4b6677dd83 /stdlib/addmul_1.c
parent27611fd05b444042de4a718c2f21e9efae755825 (diff)
downloadglibc-e37ec9c813de3faeabc31d9ffc896ba45b4dfd5f.tar.gz
glibc-e37ec9c813de3faeabc31d9ffc896ba45b4dfd5f.tar.xz
glibc-e37ec9c813de3faeabc31d9ffc896ba45b4dfd5f.zip
utmp: Avoid -Wstringop-truncation warning
The -Wstringop-truncation option new in GCC 8 detects common misuses
of the strncat and strncpy function that may result in truncating
the copied string before the terminating NUL.  To avoid false positive
warnings for correct code that intentionally creates sequences of
characters that aren't guaranteed to be NUL-terminated, arrays that
are intended to store such sequences should be decorated with a new
nonstring attribute.  This change add this attribute to Glibc and
uses it to suppress such false positives.

ChangeLog:
	* misc/sys/cdefs.h (__attribute_nonstring__): New macro.
	* sysdeps/gnu/bits/utmp.h (struct utmp): Use it.
	* sysdeps/unix/sysv/linux/s390/bits/utmp.h (struct utmp): Same.

(cherry picked from commit 7532837d7b03b3ca5b9a63d77a5bd81dd23f3d9c)
Diffstat (limited to 'stdlib/addmul_1.c')
0 files changed, 0 insertions, 0 deletions