suricata: work around scan-build warnings

suricata.c:691:17: warning: Value stored to 'bits' during its initialization is never read [deadcode.DeadStores]
    const char *bits = "<unknown>-bits";
                ^~~~   ~~~~~~~~~~~~~~~~
suricata.c:692:17: warning: Value stored to 'endian' during its initialization is never read [deadcode.DeadStores]
    const char *endian = "<unknown>-endian";
                ^~~~~~   ~~~~~~~~~~~~~~~~~~
2 warnings generated.
pull/8753/head
Victor Julien 2 years ago
parent 0c15114450
commit c13a6fa73c

@ -688,8 +688,8 @@ static void PrintUsage(const char *progname)
static void PrintBuildInfo(void) static void PrintBuildInfo(void)
{ {
const char *bits = "<unknown>-bits"; const char *bits;
const char *endian = "<unknown>-endian"; const char *endian;
char features[2048] = ""; char features[2048] = "";
const char *tls; const char *tls;
@ -821,12 +821,16 @@ static void PrintBuildInfo(void)
bits = "64-bits"; bits = "64-bits";
#elif __WORDSIZE == 32 #elif __WORDSIZE == 32
bits = "32-bits"; bits = "32-bits";
#else
bits = "<unknown>-bits";
#endif #endif
#if __BYTE_ORDER == __BIG_ENDIAN #if __BYTE_ORDER == __BIG_ENDIAN
endian = "Big-endian"; endian = "Big-endian";
#elif __BYTE_ORDER == __LITTLE_ENDIAN #elif __BYTE_ORDER == __LITTLE_ENDIAN
endian = "Little-endian"; endian = "Little-endian";
#else
endian = "<unknown>-endian";
#endif #endif
printf("%s, %s architecture\n", bits, endian); printf("%s, %s architecture\n", bits, endian);

Loading…
Cancel
Save