qemu-e2k/include/qemu
Philippe Mathieu-Daudé 1daff2f819 qemu/compiler: Define QEMU_NONSTRING
GCC 8 introduced the -Wstringop-truncation checker to detect truncation by
the strncat and strncpy functions (closely related to -Wstringop-overflow,
which detect buffer overflow by string-modifying functions declared in
<string.h>).

In tandem of -Wstringop-truncation, the "nonstring" attribute was added:

  The nonstring variable attribute specifies that an object or member
  declaration with type array of char, signed char, or unsigned char,
  or pointer to such a type is intended to store character arrays that
  do not necessarily contain a terminating NUL. This is useful in detecting
  uses of such arrays or pointers with functions that expect NUL-terminated
  strings, and to avoid warnings when such an array or pointer is used as
  an argument to a bounded string manipulation function such as strncpy.

  From the GCC manual: https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attributes.html#index-nonstring-variable-attribute

Add the QEMU_NONSTRING macro which checks if the compiler supports this
attribute.

Suggested-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-01-17 21:10:57 -05:00
..
acl.h avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
atomic128.h
atomic.h atomics: Set ATOMIC_REG_SIZE=8 for MIPS n32 2019-01-03 17:52:52 +01:00
base64.h
bcd.h
bitmap.h
bitops.h
bswap.h
buffer.h
compiler.h qemu/compiler: Define QEMU_NONSTRING 2019-01-17 21:10:57 -05:00
config-file.h
coroutine_int.h
coroutine.h
cpuid.h
crc32c.h
cutils.h cutils: Fix qemu_strtosz() & friends to reject non-finite sizes 2018-12-13 19:10:06 +01:00
drm.h
envlist.h
error-report.h
event_notifier.h
fifo8.h
fifo32.h
fprintf-fn.h
futex.h
hbitmap.h dirty-bitmap: make it possible to restore bitmap after merge 2018-10-29 16:23:15 -04:00
help_option.h
host-utils.h includes: Replace QEMU_GNUC_PREREQ with "__has_builtin || !defined(__clang__)" 2018-12-12 10:01:13 +01:00
id.h
int128.h
iov.h avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
iova-tree.h
jhash.h
job.h
lockable.h
log-for-trace.h
log.h
main-loop.h
memfd.h
mmap-alloc.h
module.h xen: add a mechanism to automatically create XenDevice-s... 2019-01-14 13:45:40 +00:00
notify.h
option_int.h qemu/queue.h: simplify reverse access to QTAILQ 2019-01-11 15:46:55 +01:00
option.h option: Make option help nicer to read 2018-11-05 15:17:48 +01:00
osdep.h build-sys: build with Vista API by default 2019-01-11 13:57:25 +01:00
path.h
pmem.h
processor.h
qdist.h
qht.h
qsp.h
queue.h qemu/queue.h: simplify reverse access to QTAILQ 2019-01-11 15:46:55 +01:00
range.h range: add some more functions 2019-01-09 22:09:31 -02:00
ratelimit.h
rcu_queue.h qemu/queue.h: reimplement QTAILQ without pointer-to-pointers 2019-01-11 15:46:55 +01:00
rcu.h
readline.h
seqlock.h
sockets.h
stats64.h
sys_membarrier.h
systemd.h
thread-posix.h
thread-win32.h
thread.h include/qemu/thread.h: Document qemu_thread_atexit* API 2018-11-06 21:35:06 +01:00
throttle-options.h
throttle.h
timed-average.h
timer.h * RTC fixes (Artem) 2018-10-19 19:01:07 +01:00
typedefs.h typedefs: (Re-)sort entries alphabetically 2019-01-09 11:07:54 +01:00
unicode.h
units.h include: Add a comment to explain the origin of sizes' lookup table 2018-11-05 15:29:59 +01:00
uri.h
uuid.h
vfio-helpers.h Clean up includes 2018-12-20 10:29:08 +01:00
win_dump_defs.h
xattr.h
xxhash.h xxhash: match output against the original xxhash32 2018-12-17 06:04:44 +03:00