summaryrefslogtreecommitdiff
path: root/lib/readutmp.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2018-05-03 17:38:50 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2018-05-03 17:40:16 -0700
commit72333a9c6955aa7ca938dbb5295b78e906c89f07 (patch)
treee28d2b3727861d9c1e1daacd12ac99359edc3c52 /lib/readutmp.c
parent44b65c481f32b785ef75a55533437c3b46bed352 (diff)
downloadgnulib-72333a9c6955aa7ca938dbb5295b78e906c89f07.tar.gz
maint: port more modules to GCC 8
* lib/dirname.h (base_name): * lib/exclude.h (new_exclude): * lib/xstrndup.h (xstrndup): Add malloc attribute. * lib/readutmp.c: Pacify GCC 8 about safe use of strncpy. * lib/sig-handler.h (get_handler) [SA_SIGINFO]: Simplify. This pacifies GCC 8. * m4/gnulib-common.m4 (gl_COMMON_BODY): Define _GL_ATTRIBUTE_MALLOC here. All other definitions removed.
Diffstat (limited to 'lib/readutmp.c')
-rw-r--r--lib/readutmp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/readutmp.c b/lib/readutmp.c
index a54bf6ceec..1454faab2f 100644
--- a/lib/readutmp.c
+++ b/lib/readutmp.c
@@ -38,6 +38,10 @@
# include "unlocked-io.h"
#endif
+#if 8 <= __GNUC__
+# pragma GCC diagnostic ignored "-Wsizeof-pointer-memaccess"
+#endif
+
/* Copy UT->ut_name into storage obtained from malloc. Then remove any
trailing spaces from the copy, NUL terminate it, and return the copy. */