dtterm: Resolve -Wformat-security warnings
authorPeter Howkins <flibble@users.sourceforge.net>
Wed, 29 Aug 2012 15:13:22 +0000 (16:13 +0100)
committerPeter Howkins <flibble@users.sourceforge.net>
Wed, 29 Aug 2012 15:13:22 +0000 (16:13 +0100)
cde/programs/dtterm/DtTermSyntax.c

index 5fed1a4ea54411fca1456f198da6eef77731da2d..4ac65824478646cf5d534894f7d89f076d49c6cd 100644 (file)
@@ -269,7 +269,7 @@ void Syntax(char *programName, char *badOption)
         */
         int len = fmtlen + strlen(optPtr->opt);
         if (col + len >= cols) {
-            (void) fprintf(stderr, (GETMESSAGE(NL_SETN_Syntax,49, "\r\n   ")));
+            (void) fprintf(stderr, "%s", (GETMESSAGE(NL_SETN_Syntax,49, "\r\n   ")));
             col = 3;
         }
         (void) fprintf(stderr, fmt, optPtr->opt);
@@ -292,11 +292,11 @@ void Help(char *programName)
     */
     GetUsage();
 
-    (void) fprintf(stderr, (GETMESSAGE(NL_SETN_Syntax,52, "usage:\n")));
+    (void) fprintf(stderr, "%s", (GETMESSAGE(NL_SETN_Syntax,52, "usage:\n")));
     (void) fprintf(stderr, (GETMESSAGE(NL_SETN_Syntax,53,
                    "\t%s [-options ...] [-e command args]\n\n")),
                    programName);
-    (void) fprintf(stderr, (GETMESSAGE(NL_SETN_Syntax,54,
+    (void) fprintf(stderr, "%s", (GETMESSAGE(NL_SETN_Syntax,54,
                    "where options include:\n")));
     for (optPtr = optHead; optPtr; optPtr = optPtr->next)
         if (strlen(optPtr->opt) > (size_t) width) width = strlen(optPtr->opt);