- Remove -Wno-stringop-truncation. The code as it
stands doesn't trigger the warning (with GCC),
and Clang doesn't know it.
- Initialize site_incoming msg to suppress false
positive warning.
- Add a couple of missing format string
attributes.
-Wpointer-arith -Wformat=2 -Winit-self \
-Wswitch-enum -Wunused-variable -Wunused-function -Wbad-function-cast \
-Wno-strict-aliasing -fno-strict-aliasing \
- -Wno-bool-operation -Wno-stringop-truncation
+ -Wno-bool-operation
va_end(args);
}
+FORMAT(printf,3,0)
void cfgfile_log__vmsg(void *sst, int class, const char *message, va_list args)
{
struct cfgfile_log *st=sst;
vslilog(l->u.tryload.log,class,message,args);
}
+FORMAT(printf,4,0)
static void verror_cfgfatal(struct load_ctx *l, struct cloc loc,
FILE *maybe_f,
const char *message, va_list args)
uint32_t dest=get_uint32(buf->start);
uint32_t msgtype=get_uint32(buf->start+8);
- struct msg msg;
+ struct msg msg = { 0 };
/* initialised by named_for_us, or process_msgN for N!=1 */
if (msgtype==LABEL_MSG1) {