chiark / gitweb /
terminal: suppress warning in subterm
authorDavid Herrmann <dh.herrmann@gmail.com>
Fri, 18 Jul 2014 15:46:14 +0000 (17:46 +0200)
committerDavid Herrmann <dh.herrmann@gmail.com>
Fri, 18 Jul 2014 15:46:14 +0000 (17:46 +0200)
Empty format-strings are just fine if format-functions do more than
printing. This is the case here, so suppress the "empty format-string"
warning by using "%s" with an empty argument.

src/libsystemd-terminal/subterm.c

index 46ab6b4a1e7c85ecd96e1b0cc9adc9cba244a5dc..5cf3c2a73a56b51aeeb431e09af8880ef91d5c9f 100644 (file)
@@ -386,7 +386,7 @@ static void output_draw_frame(Output *o) {
 static void output_draw_menu(Output *o) {
         assert(o);
 
 static void output_draw_menu(Output *o) {
         assert(o);
 
-        output_frame_printl(o, "");
+        output_frame_printl(o, "%s", "");
         output_frame_printl(o, "    Menu: (the following keys are recognized)");
         output_frame_printl(o, "      q: quit");
         output_frame_printl(o, "     ^C: send ^C to the PTY");
         output_frame_printl(o, "    Menu: (the following keys are recognized)");
         output_frame_printl(o, "      q: quit");
         output_frame_printl(o, "     ^C: send ^C to the PTY");