Blame SOURCES/motif-2.3.4-Fix-issues-with-Werror-format-security.patch

2b35d3
From 4783fb4cec8624311bb87b2eb4a2ac94a5c7d849 Mon Sep 17 00:00:00 2001
2b35d3
From: =?UTF-8?q?Petr=20=C5=A0abata?= <contyk@redhat.com>
2b35d3
Date: Thu, 8 Jun 2017 12:12:04 +0200
2b35d3
Subject: [PATCH] Fix issues with -Werror=format-security
2b35d3
MIME-Version: 1.0
2b35d3
Content-Type: text/plain; charset=UTF-8
2b35d3
Content-Transfer-Encoding: 8bit
2b35d3
2b35d3
Signed-off-by: Petr Ĺ abata <contyk@redhat.com>
2b35d3
---
2b35d3
 lib/Mrm/Mrmhier.c       |   4 +-
2b35d3
 lib/Mrm/Mrmicon.c       |   4 +-
2b35d3
 lib/Mrm/Mrmlread.c      |   2 +-
2b35d3
 lib/Mrm/Mrmwcrw.c       |   4 +-
2b35d3
 tools/wml/wmldbcreate.c |   2 +-
2b35d3
 tools/wml/wmlouth.c     | 128 ++++++++++++++++++++++++------------------------
2b35d3
 tools/wml/wmloutkey.c   |  10 ++--
2b35d3
 tools/wml/wmloutmm.c    |  16 +++---
2b35d3
 tools/wml/wmlresolve.c  |  26 +++++-----
2b35d3
 9 files changed, 98 insertions(+), 98 deletions(-)
2b35d3
2b35d3
diff --git a/lib/Mrm/Mrmhier.c b/lib/Mrm/Mrmhier.c
2b35d3
index 2712742..2a8703c 100644
2b35d3
--- a/lib/Mrm/Mrmhier.c
2b35d3
+++ b/lib/Mrm/Mrmhier.c
2b35d3
@@ -264,10 +264,10 @@ Urm__OpenHierarchy (MrmCount			num_files,
2b35d3
 	    case MrmSUCCESS:
2b35d3
 	      break;
2b35d3
 	    case MrmNOT_VALID:
2b35d3
-	      sprintf (err_stg, _MrmMMsg_0113);
2b35d3
+	      sprintf (err_stg, "%s", _MrmMMsg_0113);
2b35d3
 	      break;
2b35d3
 	    default:
2b35d3
-	      sprintf (err_stg, _MrmMMsg_0114);
2b35d3
+	      sprintf (err_stg, "%s", _MrmMMsg_0114);
2b35d3
 	      break;
2b35d3
 	    }
2b35d3
 	}
2b35d3
diff --git a/lib/Mrm/Mrmicon.c b/lib/Mrm/Mrmicon.c
2b35d3
index 95d4086..191e2d2 100644
2b35d3
--- a/lib/Mrm/Mrmicon.c
2b35d3
+++ b/lib/Mrm/Mrmicon.c
2b35d3
@@ -1176,7 +1176,7 @@ Urm__RealizeColorTable (Screen			*screen,
2b35d3
 		}
2b35d3
 		break;
2b35d3
 	      default:
2b35d3
-		sprintf(err_msg, _MrmMMsg_0040);
2b35d3
+		sprintf(err_msg, "%s", _MrmMMsg_0040);
2b35d3
 		return Urm__UT_Error ("Urm__RelizeColorTable",
2b35d3
 				      err_msg, NULL, NULL, MrmFAILURE) ;
2b35d3
 	      }
2b35d3
@@ -1252,7 +1252,7 @@ Urm__RealizeColorTable (Screen			*screen,
2b35d3
 	      break;
2b35d3
 	    default:
2b35d3
 	      result = MrmFAILURE;
2b35d3
-	      sprintf (err_msg, _MrmMMsg_0040);
2b35d3
+	      sprintf (err_msg, "%s", _MrmMMsg_0040);
2b35d3
 	      Urm__UT_Error ("Urm__RelizeColorTable",
2b35d3
 			     err_msg, NULL, NULL, MrmFAILURE) ;
2b35d3
 	    }
2b35d3
diff --git a/lib/Mrm/Mrmlread.c b/lib/Mrm/Mrmlread.c
2b35d3
index c2fd94c..be433a3 100644
2b35d3
--- a/lib/Mrm/Mrmlread.c
2b35d3
+++ b/lib/Mrm/Mrmlread.c
2b35d3
@@ -698,7 +698,7 @@ MrmFetchColorLiteral (MrmHierarchy                hierarchy_id,
2b35d3
 	 XBlackPixelOfScreen(XDefaultScreenOfDisplay(display)));
2b35d3
       break;
2b35d3
     default:
2b35d3
-      sprintf(err_msg, _MrmMMsg_0040);
2b35d3
+      sprintf(err_msg, "%s", _MrmMMsg_0040);
2b35d3
       result = Urm__UT_Error ("MrmFetchColorLiteral",
2b35d3
 			      err_msg, NULL, NULL, MrmFAILURE) ;
2b35d3
       _MrmAppUnlock(app);
2b35d3
diff --git a/lib/Mrm/Mrmwcrw.c b/lib/Mrm/Mrmwcrw.c
2b35d3
index fe3db52..3c5857f 100644
2b35d3
--- a/lib/Mrm/Mrmwcrw.c
2b35d3
+++ b/lib/Mrm/Mrmwcrw.c
2b35d3
@@ -1390,7 +1390,7 @@ Urm__CW_CreateArglist (Widget			parent,
2b35d3
 			}
2b35d3
 		      break;
2b35d3
 		    default:
2b35d3
-		      sprintf (err_msg, _MrmMMsg_0040);
2b35d3
+		      sprintf (err_msg, "%s", _MrmMMsg_0040);
2b35d3
 		      result = Urm__UT_Error ("Urm__CW_ConvertValue",
2b35d3
 					      err_msg, NULL, NULL, MrmFAILURE) ;
2b35d3
 		    };
2b35d3
@@ -2426,7 +2426,7 @@ Urm__CW_ConvertValue (Widget			parent,
2b35d3
 	    }
2b35d3
 	  break;
2b35d3
 	default:
2b35d3
-	  sprintf(err_msg, _MrmMMsg_0040);
2b35d3
+	  sprintf(err_msg, "%s", _MrmMMsg_0040);
2b35d3
 	  return Urm__UT_Error ("Urm__CW_ConvertValue",
2b35d3
 				err_msg, NULL, NULL, MrmFAILURE) ;
2b35d3
 	};
2b35d3
diff --git a/tools/wml/wmldbcreate.c b/tools/wml/wmldbcreate.c
2b35d3
index 07c0a3c..6de585a 100644
2b35d3
--- a/tools/wml/wmldbcreate.c
2b35d3
+++ b/tools/wml/wmldbcreate.c
2b35d3
@@ -425,7 +425,7 @@ int	table_id;
2b35d3
 		{
2b35d3
 		fprintf (afile, "%d, ", entry_vec[j]);
2b35d3
 		}
2b35d3
-	    fprintf (afile, "\n");
2b35d3
+	    fprintf (afile, "%s", "\n");
2b35d3
 	    }
2b35d3
         }
2b35d3
 }
2b35d3
diff --git a/tools/wml/wmlouth.c b/tools/wml/wmlouth.c
2b35d3
index d2330e3..a52843f 100644
2b35d3
--- a/tools/wml/wmlouth.c
2b35d3
+++ b/tools/wml/wmlouth.c
2b35d3
@@ -225,12 +225,12 @@ if ( outfil == (FILE *) NULL )
2b35d3
     printf ("\nCouldn't open UilSymGen.h");
2b35d3
     return;
2b35d3
     }
2b35d3
-fprintf (outfil, canned_warn);
2b35d3
+fprintf (outfil, "%s", canned_warn);
2b35d3
 
2b35d3
 /*
2b35d3
  * Write the sym_k..._object literals
2b35d3
  */
2b35d3
-fprintf (outfil, canned1);
2b35d3
+fprintf (outfil, "%s", canned1);
2b35d3
 for ( ndx=0 ; ndx<wml_obj_class_ptr->cnt ; ndx++ )
2b35d3
     {
2b35d3
     clsobj = (WmlClassDefPtr) wml_obj_class_ptr->hvec[ndx].objptr;
2b35d3
@@ -244,7 +244,7 @@ for ( ndx=0 ; ndx<wml_obj_class_ptr->cnt ; ndx++ )
2b35d3
 /*
2b35d3
  * Define the sym_k_..._reason literals
2b35d3
  */
2b35d3
-fprintf (outfil, canned3);
2b35d3
+fprintf (outfil, "%s", canned3);
2b35d3
 for ( ndx=0 ; ndx<wml_obj_reason_ptr->cnt ; ndx++ )
2b35d3
     {
2b35d3
     resobj = (WmlResourceDefPtr) wml_obj_reason_ptr->hvec[ndx].objptr;
2b35d3
@@ -258,7 +258,7 @@ for ( ndx=0 ; ndx<wml_obj_reason_ptr->cnt ; ndx++ )
2b35d3
 /*
2b35d3
  * Define the sym_k_..._arg literals
2b35d3
  */
2b35d3
-fprintf (outfil, canned4);
2b35d3
+fprintf (outfil, "%s", canned4);
2b35d3
 for ( ndx=0 ; ndx<wml_obj_arg_ptr->cnt ; ndx++ )
2b35d3
     {
2b35d3
     resobj = (WmlResourceDefPtr) wml_obj_arg_ptr->hvec[ndx].objptr;
2b35d3
@@ -272,7 +272,7 @@ for ( ndx=0 ; ndx<wml_obj_arg_ptr->cnt ; ndx++ )
2b35d3
 /*
2b35d3
  * Define the sym_k_..._enumset structs and literals
2b35d3
  */
2b35d3
-fprintf (outfil, canned5);
2b35d3
+fprintf (outfil, "%s", canned5);
2b35d3
 for ( ndx=0 ; ndx<wml_obj_enumset_ptr->cnt ; ndx++ )
2b35d3
     {
2b35d3
     enumsetobj = (WmlEnumSetDefPtr) wml_obj_enumset_ptr->hvec[ndx].objptr;
2b35d3
@@ -286,7 +286,7 @@ for ( ndx=0 ; ndx<wml_obj_enumset_ptr->cnt ; ndx++ )
2b35d3
 /*
2b35d3
  * Define the sym_k_..._enumval literals
2b35d3
  */
2b35d3
-fprintf (outfil, canned6);
2b35d3
+fprintf (outfil, "%s", canned6);
2b35d3
 for ( ndx=0 ; ndx<wml_obj_enumval_ptr->cnt ; ndx++ )
2b35d3
     {
2b35d3
     enumvalobj = (WmlEnumValueDefPtr) wml_obj_enumval_ptr->hvec[ndx].objptr;
2b35d3
@@ -301,7 +301,7 @@ for ( ndx=0 ; ndx<wml_obj_enumval_ptr->cnt ; ndx++ )
2b35d3
  * Define the sym_k_..._charsize literals
2b35d3
  * Define the sym_k_..._charset literals
2b35d3
  */
2b35d3
-fprintf (outfil, canned7);
2b35d3
+fprintf (outfil, "%s", canned7);
2b35d3
 for ( ndx=0 ; ndx<wml_obj_charset_ptr->cnt ; ndx++ )
2b35d3
     {
2b35d3
     charsetobj = (WmlCharSetDefPtr) wml_obj_charset_ptr->hvec[ndx].objptr;
2b35d3
@@ -315,7 +315,7 @@ for ( ndx=0 ; ndx<wml_obj_charset_ptr->cnt ; ndx++ )
2b35d3
 /*
2b35d3
  * Define the sym_k_..._child literals
2b35d3
  */
2b35d3
-fprintf (outfil, canned8);
2b35d3
+fprintf (outfil, "%s", canned8);
2b35d3
 for ( ndx=0 ; ndx<wml_obj_child_ptr->cnt ; ndx++ )
2b35d3
     {
2b35d3
     childobj = (WmlChildDefPtr) wml_obj_child_ptr->hvec[ndx].objptr;
2b35d3
@@ -379,12 +379,12 @@ if ( outfil == (FILE *) NULL )
2b35d3
     printf ("\nCouldn't open UilSymChCL.h");
2b35d3
     return;
2b35d3
     }
2b35d3
-fprintf (outfil, canned_warn);
2b35d3
+fprintf (outfil, "%s", canned_warn);
2b35d3
 
2b35d3
 /*
2b35d3
  * Create table entries, similar to writing sym_k...
2b35d3
  */
2b35d3
-fprintf (outfil, canned1);
2b35d3
+fprintf (outfil, "%s", canned1);
2b35d3
 for ( ndx=0 ; ndx<wml_obj_child_ptr->cnt ; ndx++ )
2b35d3
     {
2b35d3
     childobj = (WmlChildDefPtr) wml_obj_child_ptr->hvec[ndx].objptr;
2b35d3
@@ -392,7 +392,7 @@ for ( ndx=0 ; ndx<wml_obj_child_ptr->cnt ; ndx++ )
2b35d3
     fprintf (outfil, "    sym_k_%s_object,\n",
2b35d3
 	     classobj->tkname);
2b35d3
     }
2b35d3
-fprintf (outfil, canned1a);
2b35d3
+fprintf (outfil, "%s", canned1a);
2b35d3
 
2b35d3
 /*
2b35d3
  * close the output file
2b35d3
@@ -446,12 +446,12 @@ if ( outfil == (FILE *) NULL )
2b35d3
     printf ("\nCouldn't open UilSymArTy.h");
2b35d3
     return;
2b35d3
     }
2b35d3
-fprintf (outfil, canned_warn);
2b35d3
+fprintf (outfil, "%s", canned_warn);
2b35d3
 
2b35d3
 /*
2b35d3
  * Create table entries, similar to writing sym_k...
2b35d3
  */
2b35d3
-fprintf (outfil, canned1);
2b35d3
+fprintf (outfil, "%s", canned1);
2b35d3
 for ( ndx=0 ; ndx<wml_obj_arg_ptr->cnt ; ndx++ )
2b35d3
     {
2b35d3
     resobj = (WmlResourceDefPtr) wml_obj_arg_ptr->hvec[ndx].objptr;
2b35d3
@@ -459,7 +459,7 @@ for ( ndx=0 ; ndx<wml_obj_arg_ptr->cnt ; ndx++ )
2b35d3
     fprintf (outfil, "    sym_k_%s_value,\n",
2b35d3
 	     datobj->tkname);
2b35d3
     }
2b35d3
-fprintf (outfil, canned1a);
2b35d3
+fprintf (outfil, "%s", canned1a);
2b35d3
 
2b35d3
 /*
2b35d3
  * close the output file
2b35d3
@@ -509,19 +509,19 @@ if ( outfil == (FILE *) NULL )
2b35d3
     printf ("\nCouldn't open UilSymRArg.h");
2b35d3
     return;
2b35d3
     }
2b35d3
-fprintf (outfil, canned_warn);
2b35d3
+fprintf (outfil, "%s", canned_warn);
2b35d3
 
2b35d3
 /*
2b35d3
  * Create table entries, similar to writing sym_k...
2b35d3
  */
2b35d3
-fprintf (outfil, canned1);
2b35d3
+fprintf (outfil, "%s", canned1);
2b35d3
 for ( ndx=0 ; ndx<wml_obj_arg_ptr->cnt ; ndx++ )
2b35d3
     {
2b35d3
     resobj = (WmlResourceDefPtr) wml_obj_arg_ptr->hvec[ndx].objptr;
2b35d3
     fprintf (outfil, "    %d,\n",
2b35d3
 	     resobj->related_code);
2b35d3
     }
2b35d3
-fprintf (outfil, canned1a);
2b35d3
+fprintf (outfil, "%s", canned1a);
2b35d3
 
2b35d3
 /*
2b35d3
  * close the output file
2b35d3
@@ -621,12 +621,12 @@ if ( outfil == (FILE *) NULL )
2b35d3
     printf ("\nCouldn't open UilUrmClas.h");
2b35d3
     return;
2b35d3
     }
2b35d3
-fprintf (outfil, canned_warn);
2b35d3
+fprintf (outfil, "%s", canned_warn);
2b35d3
 
2b35d3
 /*
2b35d3
  * Write entries for widgets
2b35d3
  */
2b35d3
-fprintf (outfil, canned1);
2b35d3
+fprintf (outfil, "%s", canned1);
2b35d3
 for ( ndx=0 ; ndx<wml_obj_class_ptr->cnt ; ndx++ )
2b35d3
     {
2b35d3
     clsobj = (WmlClassDefPtr) wml_obj_class_ptr->hvec[ndx].objptr;
2b35d3
@@ -637,7 +637,7 @@ for ( ndx=0 ; ndx<wml_obj_class_ptr->cnt ; ndx++ )
2b35d3
     else 
2b35d3
 	fprintf (outfil, "  \"%s\",\t\n", synobj->convfunc);
2b35d3
     }
2b35d3
-fprintf (outfil, canned2);
2b35d3
+fprintf (outfil, "%s", canned2);
2b35d3
 
2b35d3
 /*
2b35d3
  * Write entries for gadget variants of widget classes
2b35d3
@@ -661,7 +661,7 @@ for ( ndx=0 ; ndx<wml_obj_class_ptr->cnt ; ndx++ )
2b35d3
 		     synobj->name);
2b35d3
 	}
2b35d3
     }
2b35d3
-fprintf (outfil, canned3);
2b35d3
+fprintf (outfil, "%s", canned3);
2b35d3
 
2b35d3
 /*
2b35d3
  * Write entries for non-dialog widgets
2b35d3
@@ -685,7 +685,7 @@ for ( ndx=0 ; ndx<wml_obj_class_ptr->cnt ; ndx++ )
2b35d3
 		     synobj->name);
2b35d3
 	}
2b35d3
     }
2b35d3
-fprintf (outfil, canned4);
2b35d3
+fprintf (outfil, "%s", canned4);
2b35d3
 
2b35d3
 /*
2b35d3
  * Write entries for the resource a widget's controls map to
2b35d3
@@ -701,7 +701,7 @@ for ( ndx=0 ; ndx<wml_obj_class_ptr->cnt ; ndx++ )
2b35d3
     else
2b35d3
 	fprintf (outfil, "  sym_k_%s_arg,\n", mapresobj->tkname);
2b35d3
     }
2b35d3
-fprintf (outfil, canned5);
2b35d3
+fprintf (outfil, "%s", canned5);
2b35d3
 
2b35d3
 /*
2b35d3
  * Write entries for arguments
2b35d3
@@ -714,7 +714,7 @@ for ( ndx=0 ; ndx<wml_obj_arg_ptr->cnt ; ndx++ )
2b35d3
     fprintf (outfil, "  %s,\n",
2b35d3
 	     synres->resliteral);
2b35d3
     }
2b35d3
-fprintf (outfil, canned6);
2b35d3
+fprintf (outfil, "%s", canned6);
2b35d3
 
2b35d3
 /*
2b35d3
  * Write entries for reasons
2b35d3
@@ -727,7 +727,7 @@ for ( ndx=0 ; ndx<wml_obj_reason_ptr->cnt ; ndx++ )
2b35d3
     fprintf (outfil, "  %s,\n",
2b35d3
 	     synres->resliteral);
2b35d3
     }
2b35d3
-fprintf (outfil, canned7);
2b35d3
+fprintf (outfil, "%s", canned7);
2b35d3
 
2b35d3
 /*
2b35d3
  * close the output file
2b35d3
@@ -781,13 +781,13 @@ if ( outfil == (FILE *) NULL )
2b35d3
     printf ("\nCouldn't open UilConst.h");
2b35d3
     return;
2b35d3
     }
2b35d3
-fprintf (outfil, canned_warn);
2b35d3
+fprintf (outfil, "%s", canned_warn);
2b35d3
 
2b35d3
 /*
2b35d3
  * Process the arguments in code order. We start with 1, and write out
2b35d3
  * the mask after processing 8 codes.
2b35d3
  */
2b35d3
-fprintf (outfil, canned1);
2b35d3
+fprintf (outfil, "%s", canned1);
2b35d3
 strcpy (maskbuf, "0");
2b35d3
 for ( ndx=0 ; ndx<wml_obj_arg_ptr->cnt ; ndx++ )
2b35d3
     {
2b35d3
@@ -805,7 +805,7 @@ for ( ndx=0 ; ndx<wml_obj_arg_ptr->cnt ; ndx++ )
2b35d3
     }
2b35d3
 if ( bitno != 8 )
2b35d3
     fprintf (outfil, "%s", maskbuf);
2b35d3
-fprintf (outfil, canned1a);
2b35d3
+fprintf (outfil, "%s", canned1a);
2b35d3
 
2b35d3
 /*
2b35d3
  * close the output file
2b35d3
@@ -878,8 +878,8 @@ if ( outfil == (FILE *) NULL )
2b35d3
     printf ("\nCouldn't open UilSymReas.h");
2b35d3
     return;
2b35d3
     }
2b35d3
-fprintf (outfil, canned_warn);
2b35d3
-fprintf (outfil, canned1);
2b35d3
+fprintf (outfil, "%s", canned_warn);
2b35d3
+fprintf (outfil, "%s", canned1);
2b35d3
 
2b35d3
 /*
2b35d3
  * Generate the bit vectors for each class. Outer loop on the reason code,
2b35d3
@@ -919,19 +919,19 @@ for ( resndx=0 ; resndx<wml_obj_reason_ptr->cnt ; resndx++ )
2b35d3
     if ( itemno != 0 )
2b35d3
 	fprintf (outfil, "%s 0};\n", maskbuf);
2b35d3
     else
2b35d3
-	fprintf (outfil, "};\n");
2b35d3
+	fprintf (outfil, "%s", "};\n");
2b35d3
     }
2b35d3
 
2b35d3
 /*
2b35d3
  * Write the vector of vectors.
2b35d3
  */
2b35d3
-fprintf (outfil, canned2);
2b35d3
+fprintf (outfil, "%s", canned2);
2b35d3
 for ( resndx=0 ; resndx<wml_obj_reason_ptr->cnt ; resndx++ )
2b35d3
     {
2b35d3
     resobj = (WmlResourceDefPtr) wml_obj_reason_ptr->hvec[resndx].objptr;
2b35d3
     fprintf (outfil, "  reason_class_vec%d,\n", resobj->sym_code);
2b35d3
     }
2b35d3
-fprintf (outfil, canned3);
2b35d3
+fprintf (outfil, "%s", canned3);
2b35d3
 
2b35d3
 /*
2b35d3
  * close the output file
2b35d3
@@ -1004,8 +1004,8 @@ if ( outfil == (FILE *) NULL )
2b35d3
     printf ("\nCouldn't open UilSymArTa.h");
2b35d3
     return;
2b35d3
     }
2b35d3
-fprintf (outfil, canned_warn);
2b35d3
-fprintf (outfil, canned1);
2b35d3
+fprintf (outfil, "%s", canned_warn);
2b35d3
+fprintf (outfil, "%s", canned1);
2b35d3
 
2b35d3
 /*
2b35d3
  * Generate the bit vectors for each class. Outer loop on the argument code,
2b35d3
@@ -1045,19 +1045,19 @@ for ( resndx=0 ; resndx<wml_obj_arg_ptr->cnt ; resndx++ )
2b35d3
     if ( itemno != 0 )
2b35d3
 	fprintf (outfil, "%s 0};\n", maskbuf);
2b35d3
     else
2b35d3
-	fprintf (outfil, "};\n");
2b35d3
+	fprintf (outfil, "%s", "};\n");
2b35d3
     }
2b35d3
 
2b35d3
 /*
2b35d3
  * Write the vector of vectors.
2b35d3
  */
2b35d3
-fprintf (outfil, canned2);
2b35d3
+fprintf (outfil, "%s", canned2);
2b35d3
 for ( resndx=0 ; resndx<wml_obj_arg_ptr->cnt ; resndx++ )
2b35d3
     {
2b35d3
     resobj = (WmlResourceDefPtr) wml_obj_arg_ptr->hvec[resndx].objptr;
2b35d3
     fprintf (outfil, "  arg_class_vec%d,\n", resobj->sym_code);
2b35d3
     }
2b35d3
-fprintf (outfil, canned3);
2b35d3
+fprintf (outfil, "%s", canned3);
2b35d3
 
2b35d3
 /*
2b35d3
  * close the output file
2b35d3
@@ -1129,8 +1129,8 @@ if ( outfil == (FILE *) NULL )
2b35d3
     printf ("\nCouldn't open UilSymChTa.h");
2b35d3
     return;
2b35d3
     }
2b35d3
-fprintf (outfil, canned_warn);
2b35d3
-fprintf (outfil, canned1);
2b35d3
+fprintf (outfil, "%s", canned_warn);
2b35d3
+fprintf (outfil, "%s", canned1);
2b35d3
 
2b35d3
 /*
2b35d3
  * Generate the bit vectors for each class. Outer loop on the child code,
2b35d3
@@ -1168,19 +1168,19 @@ for ( childndx=0 ; childndx<wml_obj_child_ptr->cnt ; childndx++ )
2b35d3
     if ( itemno != 0 )
2b35d3
 	fprintf (outfil, "%s 0};\n", maskbuf);
2b35d3
     else
2b35d3
-	fprintf (outfil, "};\n");
2b35d3
+	fprintf (outfil, "%s", "};\n");
2b35d3
     }
2b35d3
 
2b35d3
 /*
2b35d3
  * Write the vector of vectors.
2b35d3
  */
2b35d3
-fprintf (outfil, canned2);
2b35d3
+fprintf (outfil, "%s", canned2);
2b35d3
 for ( childndx=0 ; childndx<wml_obj_child_ptr->cnt ; childndx++ )
2b35d3
     {
2b35d3
     childobj = (WmlChildDefPtr) wml_obj_child_ptr->hvec[childndx].objptr;
2b35d3
     fprintf (outfil, "  child_class_vec%d,\n", childobj->sym_code);
2b35d3
     }
2b35d3
-fprintf (outfil, canned3);
2b35d3
+fprintf (outfil, "%s", canned3);
2b35d3
 
2b35d3
 /*
2b35d3
  * close the output file
2b35d3
@@ -1251,8 +1251,8 @@ if ( outfil == (FILE *) NULL )
2b35d3
     printf ("\nCouldn't open UilSymCtl.h");
2b35d3
     return;
2b35d3
     }
2b35d3
-fprintf (outfil, canned_warn);
2b35d3
-fprintf (outfil, canned1);
2b35d3
+fprintf (outfil, "%s", canned_warn);
2b35d3
+fprintf (outfil, "%s", canned1);
2b35d3
 
2b35d3
 /*
2b35d3
  * Generate the bit vectors for each class. Outer loop on the class code,
2b35d3
@@ -1290,19 +1290,19 @@ for ( ctlndx=0 ; ctlndx<wml_obj_class_ptr->cnt ; ctlndx++ )
2b35d3
     if ( itemno != 0 )
2b35d3
 	fprintf (outfil, "%s 0};\n", maskbuf);
2b35d3
     else
2b35d3
-	fprintf (outfil, "};\n");
2b35d3
+	fprintf (outfil, "%s", "};\n");
2b35d3
     }
2b35d3
 
2b35d3
 /*
2b35d3
  * Write the vector of vectors.
2b35d3
  */
2b35d3
-fprintf (outfil, canned2);
2b35d3
+fprintf (outfil, "%s", canned2);
2b35d3
 for ( ctlndx=0 ; ctlndx<wml_obj_class_ptr->cnt ; ctlndx++ )
2b35d3
     {
2b35d3
     clsobj = (WmlClassDefPtr) wml_obj_class_ptr->hvec[ctlndx].objptr;
2b35d3
     fprintf (outfil, "  object_class_vec%d,\n", clsobj->sym_code);
2b35d3
     }
2b35d3
-fprintf (outfil, canned3);
2b35d3
+fprintf (outfil, "%s", canned3);
2b35d3
 
2b35d3
 /*
2b35d3
  * close the output file
2b35d3
@@ -1438,7 +1438,7 @@ if ( outfil == (FILE *) NULL )
2b35d3
     printf ("\nCouldn't open UilSymNam.h");
2b35d3
     return;
2b35d3
     }
2b35d3
-fprintf (outfil, canned_warn);
2b35d3
+fprintf (outfil, "%s", canned_warn);
2b35d3
 
2b35d3
 /*
2b35d3
  * Write entries for widgets
2b35d3
@@ -1517,7 +1517,7 @@ for ( ndx=0 ; ndx<wml_obj_child_ptr->cnt ; ndx++ )
2b35d3
     fprintf (outfil, "    \"%s\",\n",
2b35d3
 	     synch->name);
2b35d3
     }
2b35d3
-fprintf (outfil, canned7);
2b35d3
+fprintf (outfil, "%s", canned7);
2b35d3
 
2b35d3
 /*
2b35d3
  * close the output file
2b35d3
@@ -1621,12 +1621,12 @@ if ( outfil == (FILE *) NULL )
2b35d3
     printf ("\nCouldn't open UilSymEnum.h");
2b35d3
     return;
2b35d3
     }
2b35d3
-fprintf (outfil, canned_warn);
2b35d3
+fprintf (outfil, "%s", canned_warn);
2b35d3
 
2b35d3
 /*
2b35d3
  * Generate the enumeration value vectors for each enumeration set.
2b35d3
  */
2b35d3
-fprintf (outfil, canned1);
2b35d3
+fprintf (outfil, "%s", canned1);
2b35d3
 for ( ndx=0 ; ndx<wml_obj_enumset_ptr->cnt ; ndx++ )
2b35d3
     {
2b35d3
     enumsetobj = (WmlEnumSetDefPtr) wml_obj_enumset_ptr->hvec[ndx].objptr;
2b35d3
@@ -1637,13 +1637,13 @@ for ( ndx=0 ; ndx<wml_obj_enumset_ptr->cnt ; ndx++ )
2b35d3
 	fprintf (outfil, "    %d,\n",
2b35d3
 		 evobj->sym_code);
2b35d3
 	}
2b35d3
-    fprintf (outfil, "  };\n");
2b35d3
+    fprintf (outfil, "%s", "  };\n");
2b35d3
     }
2b35d3
 
2b35d3
 /*
2b35d3
  * Generate the enumeration set tables
2b35d3
  */
2b35d3
-fprintf (outfil, canned3);
2b35d3
+fprintf (outfil, "%s", canned3);
2b35d3
 for ( ndx=0 ; ndx<wml_obj_enumset_ptr->cnt ; ndx++ )
2b35d3
     {
2b35d3
     enumsetobj = (WmlEnumSetDefPtr) wml_obj_enumset_ptr->hvec[ndx].objptr;
2b35d3
@@ -1655,7 +1655,7 @@ for ( ndx=0 ; ndx<wml_obj_enumset_ptr->cnt ; ndx++ )
2b35d3
 /*
2b35d3
  * Create enumset table entries for arguments, similar to writing sym_k...
2b35d3
  */
2b35d3
-fprintf (outfil, canned4);
2b35d3
+fprintf (outfil, "%s", canned4);
2b35d3
 for ( ndx=0 ; ndx<wml_obj_arg_ptr->cnt ; ndx++ )
2b35d3
     {
2b35d3
     resobj = (WmlResourceDefPtr) wml_obj_arg_ptr->hvec[ndx].objptr;
2b35d3
@@ -1669,13 +1669,13 @@ for ( ndx=0 ; ndx<wml_obj_arg_ptr->cnt ; ndx++ )
2b35d3
 /*
2b35d3
  * Create the enumval values table.
2b35d3
  */
2b35d3
-fprintf (outfil, canned5);
2b35d3
+fprintf (outfil, "%s", canned5);
2b35d3
 for ( ndx=0 ; ndx<wml_obj_enumval_ptr->cnt ; ndx++ )
2b35d3
     {
2b35d3
     evobj = (WmlEnumValueDefPtr) wml_obj_enumval_ptr->hvec[ndx].objptr;
2b35d3
     fprintf (outfil, "  %s,\n", evobj->syndef->enumlit);
2b35d3
     }
2b35d3
-fprintf (outfil, canned5a);
2b35d3
+fprintf (outfil, "%s", canned5a);
2b35d3
 
2b35d3
 /*
2b35d3
  * close the output file
2b35d3
@@ -1813,12 +1813,12 @@ if ( outfil == (FILE *) NULL )
2b35d3
     printf ("\nCouldn't open UilSymCSet.h");
2b35d3
     return;
2b35d3
     }
2b35d3
-fprintf (outfil, canned_warn);
2b35d3
+fprintf (outfil, "%s", canned_warn);
2b35d3
 
2b35d3
 /*
2b35d3
  * Generate the standards name table
2b35d3
  */
2b35d3
-fprintf (outfil, canned1);
2b35d3
+fprintf (outfil, "%s", canned1);
2b35d3
 for ( ndx=0 ; ndx<wml_obj_charset_ptr->cnt ; ndx++ )
2b35d3
     {
2b35d3
     csobj = (WmlCharSetDefPtr) wml_obj_charset_ptr->hvec[ndx].objptr;
2b35d3
@@ -1836,7 +1836,7 @@ for ( ndx=0 ; ndx<wml_obj_charset_ptr->cnt ; ndx++ )
2b35d3
 /*
2b35d3
  * Generate the writing direction table
2b35d3
  */
2b35d3
-fprintf (outfil, canned2);
2b35d3
+fprintf (outfil, "%s", canned2);
2b35d3
 for ( ndx=0 ; ndx<wml_obj_charset_ptr->cnt ; ndx++ )
2b35d3
     {
2b35d3
     csobj = (WmlCharSetDefPtr) wml_obj_charset_ptr->hvec[ndx].objptr;
2b35d3
@@ -1858,7 +1858,7 @@ for ( ndx=0 ; ndx<wml_obj_charset_ptr->cnt ; ndx++ )
2b35d3
 /*
2b35d3
  * Generate the parsing direction table
2b35d3
  */
2b35d3
-fprintf (outfil, canned3);
2b35d3
+fprintf (outfil, "%s", canned3);
2b35d3
 for ( ndx=0 ; ndx<wml_obj_charset_ptr->cnt ; ndx++ )
2b35d3
     {
2b35d3
     csobj = (WmlCharSetDefPtr) wml_obj_charset_ptr->hvec[ndx].objptr;
2b35d3
@@ -1880,7 +1880,7 @@ for ( ndx=0 ; ndx<wml_obj_charset_ptr->cnt ; ndx++ )
2b35d3
 /*
2b35d3
  * Generate the character size table
2b35d3
  */
2b35d3
-fprintf (outfil, canned4);
2b35d3
+fprintf (outfil, "%s", canned4);
2b35d3
 for ( ndx=0 ; ndx<wml_obj_charset_ptr->cnt ; ndx++ )
2b35d3
     {
2b35d3
     csobj = (WmlCharSetDefPtr) wml_obj_charset_ptr->hvec[ndx].objptr;
2b35d3
@@ -1906,7 +1906,7 @@ for ( ndx=0 ; ndx<wml_obj_charset_ptr->cnt ; ndx++ )
2b35d3
 /*
2b35d3
  * Generate the $LANG name recognition table
2b35d3
  */
2b35d3
-fprintf (outfil, canned5);
2b35d3
+fprintf (outfil, "%s", canned5);
2b35d3
 lang_max = 0;
2b35d3
 for ( ndx=0 ; ndx<wml_obj_charset_ptr->cnt ; ndx++ )
2b35d3
     {
2b35d3
@@ -1936,7 +1936,7 @@ for ( ndx=0 ; ndx<wml_obj_charset_ptr->cnt ; ndx++ )
2b35d3
 /*
2b35d3
  * Generate the $LANG code lookup table, in upper case
2b35d3
  */
2b35d3
-fprintf (outfil, canned6);
2b35d3
+fprintf (outfil, "%s", canned6);
2b35d3
 for ( ndx=0 ; ndx<wml_obj_charset_ptr->cnt ; ndx++ )
2b35d3
     {
2b35d3
     csobj = (WmlCharSetDefPtr) wml_obj_charset_ptr->hvec[ndx].objptr;
2b35d3
diff --git a/tools/wml/wmloutkey.c b/tools/wml/wmloutkey.c
2b35d3
index af42f22..4c14728 100644
2b35d3
--- a/tools/wml/wmloutkey.c
2b35d3
+++ b/tools/wml/wmloutkey.c
2b35d3
@@ -574,16 +574,16 @@ if ( outfil == NULL )
2b35d3
     printf ("\nCouldn't open UilKeyTab.h");
2b35d3
     return;
2b35d3
     }
2b35d3
-fprintf (outfil, canned_warn);
2b35d3
+fprintf (outfil, "%s", canned_warn);
2b35d3
 
2b35d3
 /*
2b35d3
  * Print the case sensitive and insensitive tables
2b35d3
  */
2b35d3
-fprintf (outfil, canned1);
2b35d3
+fprintf (outfil, "%s", canned1);
2b35d3
 wmlOutputUilKeyTabBody (outfil, wml_tok_sens_ptr, &maxlen, &maxkey);
2b35d3
 fprintf (outfil, canned2, maxlen, maxkey);
2b35d3
 wmlOutputUilKeyTabBody (outfil, wml_tok_insens_ptr, &maxlen, &maxkey);
2b35d3
-fprintf (outfil, canned3);
2b35d3
+fprintf (outfil, "%s", canned3);
2b35d3
 
2b35d3
 /*
2b35d3
  * close the output file
2b35d3
@@ -812,8 +812,8 @@ if ( outfil == NULL )
2b35d3
     printf ("\nCouldn't open UilTokName.h");
2b35d3
     return;
2b35d3
     }
2b35d3
-fprintf (outfil, canned_warn);
2b35d3
-fprintf (outfil, canned1);
2b35d3
+fprintf (outfil, "%s", canned_warn);
2b35d3
+fprintf (outfil, "%s", canned1);
2b35d3
 
2b35d3
 /*
2b35d3
  * Print the token name entries
2b35d3
diff --git a/tools/wml/wmloutmm.c b/tools/wml/wmloutmm.c
2b35d3
index 84a97bb..dc8ec09 100644
2b35d3
--- a/tools/wml/wmloutmm.c
2b35d3
+++ b/tools/wml/wmloutmm.c
2b35d3
@@ -209,9 +209,9 @@ int			ctlndx;		/* to access ordered vector */
2b35d3
 /*
2b35d3
  * Write out header information
2b35d3
  */
2b35d3
-fprintf (outfil, canned1);
2b35d3
+fprintf (outfil, "%s", canned1);
2b35d3
 fprintf (outfil, "%s\n", name);
2b35d3
-fprintf (outfil, canned2);
2b35d3
+fprintf (outfil, "%s", canned2);
2b35d3
 
2b35d3
 /*
2b35d3
  * Alphabetize the controls, reason, and argument lists
2b35d3
@@ -264,7 +264,7 @@ while ( ctlref != NULL )
2b35d3
 rsnndx = 0;
2b35d3
 ctlndx = 0;
2b35d3
 if ( mm_ctl_ptr->cnt == 0 )
2b35d3
-    fprintf (outfil, "No children are supported");
2b35d3
+    fprintf (outfil, "%s", "No children are supported");
2b35d3
 while ( rsnndx<mm_rsn_ptr->cnt || ctlndx<mm_ctl_ptr->cnt )
2b35d3
     {
2b35d3
     if ( ctlndx < mm_ctl_ptr->cnt )
2b35d3
@@ -275,7 +275,7 @@ while ( rsnndx<mm_rsn_ptr->cnt || ctlndx<mm_ctl_ptr->cnt )
2b35d3
 	ctlndx += 1;
2b35d3
 	}
2b35d3
     else
2b35d3
-	fprintf (outfil, "@");
2b35d3
+	fprintf (outfil, "%s", "@");
2b35d3
     
2b35d3
     if ( rsnndx < mm_rsn_ptr->cnt )
2b35d3
 	{
2b35d3
@@ -285,9 +285,9 @@ while ( rsnndx<mm_rsn_ptr->cnt || ctlndx<mm_ctl_ptr->cnt )
2b35d3
 	rsnndx += 1;
2b35d3
 	}
2b35d3
     else
2b35d3
-	fprintf (outfil, "\n");
2b35d3
+	fprintf (outfil, "%s", "\n");
2b35d3
     }
2b35d3
-fprintf (outfil, canned3);
2b35d3
+fprintf (outfil, "%s", canned3);
2b35d3
 
2b35d3
 /*
2b35d3
  * Write out the argument table
2b35d3
@@ -319,11 +319,11 @@ while ( argndx < mm_arg_ptr->cnt )
2b35d3
 			 argref->act_resource->syndef->dflt);
2b35d3
 	}
2b35d3
 	else
2b35d3
-	    fprintf (outfil, "  \n");
2b35d3
+	    fprintf (outfil, "%s", "  \n");
2b35d3
     }    
2b35d3
     argndx += 1;
2b35d3
     }
2b35d3
-fprintf (outfil, canned4);
2b35d3
+fprintf (outfil, "%s", canned4);
2b35d3
 
2b35d3
 }
2b35d3
 
2b35d3
diff --git a/tools/wml/wmlresolve.c b/tools/wml/wmlresolve.c
2b35d3
index 464ef29..3b8642c 100644
2b35d3
--- a/tools/wml/wmlresolve.c
2b35d3
+++ b/tools/wml/wmlresolve.c
2b35d3
@@ -1340,7 +1340,7 @@ for ( ndx=0 ; ndx<wml_obj_allclass_ptr->cnt ; ndx++ )
2b35d3
 /*
2b35d3
  * close the output file
2b35d3
  */
2b35d3
-fprintf (outfil, "\n\n");
2b35d3
+fprintf (outfil, "%s", "\n\n");
2b35d3
 printf ("\nCreated report file wml.report");
2b35d3
 fclose (outfil);
2b35d3
 
2b35d3
@@ -1369,14 +1369,14 @@ fprintf (outfil, "\n\n\nClass %s:", synobj->name);
2b35d3
 switch ( synobj->type )
2b35d3
     {
2b35d3
     case WmlClassTypeMetaclass:
2b35d3
-        fprintf (outfil, "\n  Type: Metaclass\t");
2b35d3
+        fprintf (outfil, "%s", "\n  Type: Metaclass\t");
2b35d3
 	if ( synobj->superclass != NULL )
2b35d3
 	    fprintf (outfil, "Superclass: %s\t", synobj->superclass);
2b35d3
 	if ( synobj->parentclass != NULL )
2b35d3
 	    fprintf (outfil, "Parentclass: %s\t", synobj->parentclass);
2b35d3
 	break;
2b35d3
     case WmlClassTypeWidget:
2b35d3
-	fprintf (outfil, "\n  Type: Widget\t");
2b35d3
+	fprintf (outfil, "%s", "\n  Type: Widget\t");
2b35d3
 	if ( synobj->superclass != NULL )
2b35d3
 	    fprintf (outfil, "Superclass: %s\t", synobj->superclass);
2b35d3
 	if ( synobj->parentclass != NULL )
2b35d3
@@ -1388,7 +1388,7 @@ switch ( synobj->type )
2b35d3
 	    fprintf (outfil, "Convenience function: %s", synobj->convfunc);
2b35d3
 	break;
2b35d3
     case WmlClassTypeGadget:
2b35d3
-	fprintf (outfil, "\n  Type: Gadget\t");
2b35d3
+	fprintf (outfil, "%s", "\n  Type: Gadget\t");
2b35d3
 	if ( synobj->superclass != NULL )
2b35d3
 	    fprintf (outfil, "Superclass: %s\t", synobj->superclass);
2b35d3
 	if ( synobj->parentclass != NULL )
2b35d3
@@ -1414,19 +1414,19 @@ if ( clsobj->nondialog != NULL )
2b35d3
  * is intended to match the way resources are printed in the toolkit manual,
2b35d3
  * so that checking is as easy as possible.
2b35d3
  */
2b35d3
-fprintf (outfil, "\n  Arguments:");
2b35d3
+fprintf (outfil, "%s", "\n  Arguments:");
2b35d3
 wmlResolvePrintClassArgs (outfil, clsobj);
2b35d3
 
2b35d3
 /*
2b35d3
  * Print the reasons valid in the class
2b35d3
  */
2b35d3
-fprintf (outfil, "\n  Reasons:");
2b35d3
+fprintf (outfil, "%s", "\n  Reasons:");
2b35d3
 wmlResolvePrintClassReasons (outfil, clsobj);
2b35d3
 
2b35d3
 /*
2b35d3
  * Print the controls valid in the class
2b35d3
  */
2b35d3
-fprintf (outfil, "\n  Controls:");
2b35d3
+fprintf (outfil, "%s", "\n  Controls:");
2b35d3
 for ( ndx=0 ; ndx<wml_obj_class_ptr->cnt ; ndx++ )
2b35d3
     {
2b35d3
     ctrlobj = (WmlClassDefPtr) wml_obj_class_ptr->hvec[ndx].objptr;
2b35d3
@@ -1512,10 +1512,10 @@ for ( ndx=0 ; ndx<wml_obj_arg_ptr->cnt ; ndx++ )
2b35d3
     switch ( resref->exclude )
2b35d3
 	{
2b35d3
 	case WmlAttributeTrue:
2b35d3
-	    fprintf (outfil, "\n\tExclude = True;");
2b35d3
+	    fprintf (outfil, "%s", "\n\tExclude = True;");
2b35d3
 	    break;
2b35d3
 	case WmlAttributeFalse:
2b35d3
-	    fprintf (outfil, "\n\tExclude = False;");
2b35d3
+	    fprintf (outfil, "%s", "\n\tExclude = False;");
2b35d3
 	    break;
2b35d3
 	}
2b35d3
     if ( resref->dflt != NULL )
2b35d3
@@ -1558,10 +1558,10 @@ if ( constr )
2b35d3
 	switch ( resref->exclude )
2b35d3
 	    {
2b35d3
 	    case WmlAttributeTrue:
2b35d3
-	        fprintf (outfil, "\n\tExclude = True;");
2b35d3
+	        fprintf (outfil, "%s", "\n\tExclude = True;");
2b35d3
 		break;
2b35d3
 	    case WmlAttributeFalse:
2b35d3
-		fprintf (outfil, "\n\tExclude = False;");
2b35d3
+		fprintf (outfil, "%s", "\n\tExclude = False;");
2b35d3
 		break;
2b35d3
 	    }
2b35d3
 	if ( resref->dflt != NULL )
2b35d3
@@ -1632,10 +1632,10 @@ for ( ndx=0 ; ndx<wml_obj_reason_ptr->cnt ; ndx++ )
2b35d3
     switch ( resref->exclude )
2b35d3
 	{
2b35d3
 	case WmlAttributeTrue:
2b35d3
-	    fprintf (outfil, "\n\tExclude = True;");
2b35d3
+	    fprintf (outfil, "%s", "\n\tExclude = True;");
2b35d3
 	    break;
2b35d3
 	case WmlAttributeFalse:
2b35d3
-	    fprintf (outfil, "\n\tExclude = False;");
2b35d3
+	    fprintf (outfil, "%s", "\n\tExclude = False;");
2b35d3
 	    break;
2b35d3
 	}
2b35d3
     resobj->ref_ptr = NULL;
2b35d3
-- 
2b35d3
2.13.0
2b35d3