Skip to contentSkip to conversation

PATCH] fix net.c compile warning

Qemu-devel Applied Robert Reif 2 participants 2 messages Apr 27, 2009

lore
Share & tools
lore
#0 lore raw

Fix net.c compile warning:

CC net.o
net.c: In function ‘net_slirp_redir’:
net.c:623: warning: format not a string literal and no format arguments

net.c +1 -1
index db2f8d3..7ae1e6d 100644
@@ -620,7 +620,7 @@ void net_slirp_redir(Monitor *mon, const char *redir_str)
     errmsg = "invalid redirection format\n";
  fail:
     if (mon) {
-        monitor_printf(mon, errmsg);
+        monitor_printf(mon, "%s", errmsg);
     } else {
         fprintf(stderr, "qemu: %s", errmsg);
         exit(1);
Applied
#1 lore raw
Quoted 7 lines · Robert Reif

Fix net.c compile warning:

CC net.o
net.c: In function ‘net_slirp_redir’:
net.c:623: warning: format not a string literal and no format arguments

Thanks, applied.