projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d80302d
)
uevent: placate gcc
author
Denys Vlasenko
<vda.linux@googlemail.com>
Wed, 16 Aug 2017 09:45:09 +0000
(11:45 +0200)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Wed, 16 Aug 2017 09:45:09 +0000
(11:45 +0200)
How sizeof() can be an aliasing problem?
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
util-linux/uevent.c
patch
|
blob
|
history
diff --git
a/util-linux/uevent.c
b/util-linux/uevent.c
index 252e8fb6411159e15daf99d0fad5e2938f099d56..7ff866ceca059a9ab86b82d6bcaf1e96f986a695 100644
(file)
--- a/
util-linux/uevent.c
+++ b/
util-linux/uevent.c
@@
-32,7
+32,10
@@
#define env ((char **)bb_common_bufsiz1)
#define INIT_G() do { setup_common_bufsiz(); } while (0)
enum {
- MAX_ENV = COMMON_BUFSIZE / sizeof(env[0]) - 1,
+ MAX_ENV = COMMON_BUFSIZE / sizeof(char*) - 1,
+ /* sizeof(env[0]) instead of sizeof(char*)
+ * makes gcc-6.3.0 emit "strict-aliasing" warning.
+ */
};
#ifndef SO_RCVBUFFORCE