Skip to contentSkip to conversation

Fix gcc warning 'format not a string literal and no format arguments'

PATCH In review Shahar Havivi 2 participants 2 messages Mar 19, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix gcc warning 'format not a string literal and no format arguments'

gcc 4.4.1 produce a warning 'format not a string literal and no format arguments'

---
 qemu-error.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
qemu-error.c +1 -1
index 5d5fe37..14ec14f 100644
@@ -188,7 +188,7 @@ void error_print_loc(void)
         error_printf(" ");
         break;
     default:
-        error_printf(sep);
+        error_printf("%s", sep);
     }
 }
 
Signature · 1 line
1.6.3.3
#1 lore raw
Quoted 13 lines · Shahar Havivi

gcc 4.4.1 produce a warning 'format not a string literal and no format arguments'

---
 qemu-error.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
qemu-error.c +0 -0
index 5d5fe37..14ec14f 100644

qemu-error.c void error_print_loc(void) · line 193

Quoted 7 lines
qemu-error.c +1 -1
@@ -188,7 +188,7 @@ void error_print_loc(void)
         error_printf(" ");
         break;
     default:
-        error_printf(sep);
+        error_printf("%s", sep);
     }
 }

Fair enough.