uevent: placate gcc

How sizeof() can be an aliasing problem?

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2017-08-16 11:45:09 +02:00
parent d80302db99
commit c4367d7227

View File

@ -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