aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-08-16 11:45:09 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-08-16 11:45:09 +0200
commitc4367d72272f72f647d7847129164901f3d47955 (patch)
tree272ca6af1e05b7c5133de8ba0b25bd4e184e6865
parentd80302db999d8cb92530333801e05652060177c4 (diff)
downloadbusybox-w32-c4367d72272f72f647d7847129164901f3d47955.tar.gz
busybox-w32-c4367d72272f72f647d7847129164901f3d47955.tar.bz2
busybox-w32-c4367d72272f72f647d7847129164901f3d47955.zip
uevent: placate gcc
How sizeof() can be an aliasing problem? Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--util-linux/uevent.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/util-linux/uevent.c b/util-linux/uevent.c
index 252e8fb64..7ff866cec 100644
--- a/util-linux/uevent.c
+++ b/util-linux/uevent.c
@@ -32,7 +32,10 @@
32#define env ((char **)bb_common_bufsiz1) 32#define env ((char **)bb_common_bufsiz1)
33#define INIT_G() do { setup_common_bufsiz(); } while (0) 33#define INIT_G() do { setup_common_bufsiz(); } while (0)
34enum { 34enum {
35 MAX_ENV = COMMON_BUFSIZE / sizeof(env[0]) - 1, 35 MAX_ENV = COMMON_BUFSIZE / sizeof(char*) - 1,
36 /* sizeof(env[0]) instead of sizeof(char*)
37 * makes gcc-6.3.0 emit "strict-aliasing" warning.
38 */
36}; 39};
37 40
38#ifndef SO_RCVBUFFORCE 41#ifndef SO_RCVBUFFORCE