dtlogin: Resolve all -Wformat-security warnings
authorPeter Howkins <flibble@users.sourceforge.net>
Thu, 30 Aug 2012 21:19:49 +0000 (22:19 +0100)
committerPeter Howkins <flibble@users.sourceforge.net>
Thu, 30 Aug 2012 21:19:49 +0000 (22:19 +0100)
cde/programs/dtlogin/dm.c
cde/programs/dtlogin/error.c

index 31635dcd46d94bdfccdaefc2d369649d4ae375e7..52bcb902f5accb81a6c62f528a248bc48bdea8fd 100644 (file)
@@ -1623,17 +1623,17 @@ GettyMessage( struct display *d, int msgnum )
        switch (msgnum) {
        case 1:
        
-         fprintf(tf,(char *)ReadCatalog(MC_LABEL_SET,MC_SUS1_LABEL,MC_DEF_SUS1_LABEL));
+         fprintf(tf, "%s", (char *)ReadCatalog(MC_LABEL_SET,MC_SUS1_LABEL,MC_DEF_SUS1_LABEL));
 
-         fprintf(tf,(char *)ReadCatalog(MC_LABEL_SET,MC_SUS2_LABEL,MC_DEF_SUS2_LABEL));
+         fprintf(tf, "%s", (char *)ReadCatalog(MC_LABEL_SET,MC_SUS2_LABEL,MC_DEF_SUS2_LABEL));
 
-         fprintf(tf,(char *)ReadCatalog(MC_LABEL_SET,MC_SUS3_LABEL,MC_DEF_SUS3_LABEL));
+         fprintf(tf, "%s", (char *)ReadCatalog(MC_LABEL_SET,MC_SUS3_LABEL,MC_DEF_SUS3_LABEL));
 
          break;
          
        case 2:
        
-         fprintf(tf,(char *)ReadCatalog(MC_LABEL_SET,MC_RES_LABEL,MC_DEF_RES_LABEL));
+         fprintf(tf, "%s", (char *)ReadCatalog(MC_LABEL_SET,MC_RES_LABEL,MC_DEF_RES_LABEL));
 
          break;
          
@@ -1643,7 +1643,7 @@ GettyMessage( struct display *d, int msgnum )
                (char *)ReadCatalog(MC_LABEL_SET,MC_START_LBLDPY,MC_DEF_START_LBLDPY),
                d->name);
 
-         fprintf(tf,(char *)ReadCatalog(MC_LABEL_SET,MC_WAIT_LABEL,MC_DEF_WAIT_LABEL));
+         fprintf(tf, "%s", (char *)ReadCatalog(MC_LABEL_SET,MC_WAIT_LABEL,MC_DEF_WAIT_LABEL));
 
          break;
          
index 65be7445a16d11de61158eb57ecba4066acfcc86..1ddfe2efd258625a72cb5122238b1c6fbb912c38 100644 (file)
@@ -330,7 +330,7 @@ LogOutOfMem( unsigned char *fmt, ...)
     Va_start(args,fmt);
 
     if ( SyncErrorFile(1) ) {
-       fprintf(stderr,(char *)ReadCatalog(MC_ERROR_SET,MC_NO_MEMORY,MC_DEF_NO_MEMORY));
+       fprintf(stderr, "%s", (char *)ReadCatalog(MC_ERROR_SET,MC_NO_MEMORY,MC_DEF_NO_MEMORY));
        vfprintf (stderr, (char *)fmt, args);
        fflush (stderr);
     }