From ff146016c6924f22a5132a939d8045b5e6650102 Mon Sep 17 00:00:00 2001 From: Mark Mankins Date: Tue, 19 Dec 2023 11:29:15 -0500 Subject: [PATCH] Bug fixes for -O3. Compiling at -O3 fails with warnings that don't occur at -O2. Might be related to inlining of function calls. --- qapi/string-input-visitor.c | 2 +- qemu-io-cmds.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qapi/string-input-visitor.c b/qapi/string-input-visitor.c index c089491c240..199489467b7 100644 --- a/qapi/string-input-visitor.c +++ b/qapi/string-input-visitor.c @@ -252,7 +252,7 @@ static void parse_type_uint64(Visitor *v, const char *name, uint64_t *obj, Error **errp) { /* FIXME: parse_type_int64 mishandles values over INT64_MAX */ - int64_t i; + int64_t i=0; Error *err = NULL; parse_type_int64(v, name, &i, &err); if (err) { diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c index 21af9e65b2d..423b4789308 100644 --- a/qemu-io-cmds.c +++ b/qemu-io-cmds.c @@ -2197,7 +2197,7 @@ static void help_oneline(const char *cmd, const cmdinfo_t *ct) if (cmd) { printf("%s ", cmd); } else { - printf("%s ", ct->name); + printf("%s ", ct->name ? ct->name : "(ct->name==NULL!)"); if (ct->altname) { printf("(or %s) ", ct->altname); }