Fix build warnings of "format not a string literal and no format
arguments [-Wformat-security]" for BaseTools, while using "gcc version
4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)".
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Heyi Guo <heyi.guo@linaro.org>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
if (p->ntype != nToken) continue;\r
tn=(TokNode *)p;\r
if (depth != 0) fprintf(stdout," ");\r
if (p->ntype != nToken) continue;\r
tn=(TokNode *)p;\r
if (depth != 0) fprintf(stdout," ");\r
- fprintf(stdout,TerminalString(tn->token));\r
+ fprintf(stdout, "%s", TerminalString(tn->token));\r
depth++;\r
if (! MR_AmbAidMultiple) {\r
if (set_nil(tn->tset)) {\r
depth++;\r
if (! MR_AmbAidMultiple) {\r
if (set_nil(tn->tset)) {\r
/* MR10 */ _gen(" * ");\r
/* MR10 */ for (i=0 ; i < Save_argc ; i++) {\r
/* MR10 */ _gen(" ");\r
/* MR10 */ _gen(" * ");\r
/* MR10 */ for (i=0 ; i < Save_argc ; i++) {\r
/* MR10 */ _gen(" ");\r
-/* MR10 */ _gen(Save_argv[i]);\r
+/* MR10 */ _gen1("%s", Save_argv[i]);\r
/* MR10 */ };\r
_gen("\n");\r
_gen(" *\n");\r
/* MR10 */ };\r
_gen("\n");\r
_gen(" *\n");\r
/* MR26 */ if (! (isalpha(*t) || isdigit(*t) || *t == '_' || *t == '$')) break;\r
/* MR26 */ }\r
/* MR26 */ }\r
/* MR26 */ if (! (isalpha(*t) || isdigit(*t) || *t == '_' || *t == '$')) break;\r
/* MR26 */ }\r
/* MR26 */ }\r
-/* MR26 */ fprintf(output,strBetween(pSymbol, t, pSeparator));\r
+/* MR26 */ fprintf(output, "%s", strBetween(pSymbol, t, pSeparator));\r
\r
*q = p;\r
return (*pSeparator == 0);\r
\r
*q = p;\r
return (*pSeparator == 0);\r
&pValue,\r
&pSeparator,\r
&nest);\r
&pValue,\r
&pSeparator,\r
&nest);\r
- fprintf(f,strBetween(pDataType, pSymbol, pSeparator));\r
+ fprintf(f, "%s", strBetween(pDataType, pSymbol, pSeparator));\r
}\r
\r
/* check to see if string e is a word in string s */\r
}\r
\r
/* check to see if string e is a word in string s */\r
&pSeparator,\r
&nest);\r
fprintf(f,"\t");\r
&pSeparator,\r
&nest);\r
fprintf(f,"\t");\r
- fprintf(f,strBetween(pDataType, pSymbol, pSeparator));\r
+ fprintf(f, "%s", strBetween(pDataType, pSymbol, pSeparator));\r
- fprintf(f,strBetween(pSymbol, pEqualSign, pSeparator));\r
+ fprintf(f, "%s", strBetween(pSymbol, pEqualSign, pSeparator));\r
fprintf(f,";\n");\r
}\r
fprintf(f,"};\n");\r
fprintf(f,";\n");\r
}\r
fprintf(f,"};\n");\r