Fixed various Undefined Behavior occurrences.

Conditionally uninitialized:
 - builtin_commandline.cpp:577
 - expand.cpp:869
 - parse_util.cpp:1036

Initialization of POD structs:
 - event.cpp:61
 - autoload.cpp:22

References used with va_start:
 - common.cpp:608:18

Found with clang-3.4's awesome -Wconditional-uninitialized,
-Wmissing-field-initializers and -Wvarargs.
This commit is contained in:
Daniel J. Hofmann
2014-03-07 18:20:42 +01:00
parent 79d14521db
commit 7dc0b6f40b
7 changed files with 7 additions and 7 deletions

View File

@@ -58,7 +58,7 @@ signal_list_t;
active, which is the one that new events is written to. The inactive
one contains the events that are currently beeing performed.
*/
static signal_list_t sig_list[]= {{0,0},{0,0}};
static signal_list_t sig_list[]= {{},{}};
/**
The index of sig_list that is the list of signals currently written to