]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools/VfrCompile: Explicitly state format string for DebugMsg()
authorHao Wu <hao.a.wu@intel.com>
Sat, 8 Oct 2016 12:44:51 +0000 (20:44 +0800)
committerHao Wu <hao.a.wu@intel.com>
Tue, 8 Nov 2016 08:38:21 +0000 (16:38 +0800)
For calls to API DebugMsg(), explicitly state format string as "%s" when
the given variable list is a sting.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/C/VfrCompile/VfrCompiler.cpp

index 1bca37244d5291d76bea76db3081f6580be9c1a5..ff7057a64f4ca751f8da07bd45de8f9e2c5e6a50 100644 (file)
@@ -139,7 +139,7 @@ CVfrCompiler::OptionInitialization (
           strcat (mOptions.OutputDirectory, "\\");\r
         }\r
       }\r
           strcat (mOptions.OutputDirectory, "\\");\r
         }\r
       }\r
-      DebugMsg (NULL, 0, 9, (CHAR8 *) "Output Directory", mOptions.OutputDirectory);\r
+      DebugMsg (NULL, 0, 9, (CHAR8 *) "Output Directory", (CHAR8 *) "%s", mOptions.OutputDirectory);\r
     } else if (stricmp(Argv[Index], "-b") == 0 || stricmp(Argv[Index], "--create-ifr-package") == 0 || stricmp(Argv[Index], "-ibin") == 0) {\r
       mOptions.CreateIfrPkgFile = TRUE;\r
     } else if (stricmp(Argv[Index], "-n") == 0 || stricmp(Argv[Index], "--no-pre-processing") == 0 || stricmp(Argv[Index], "-nopp") == 0) {\r
     } else if (stricmp(Argv[Index], "-b") == 0 || stricmp(Argv[Index], "--create-ifr-package") == 0 || stricmp(Argv[Index], "-ibin") == 0) {\r
       mOptions.CreateIfrPkgFile = TRUE;\r
     } else if (stricmp(Argv[Index], "-n") == 0 || stricmp(Argv[Index], "--no-pre-processing") == 0 || stricmp(Argv[Index], "-nopp") == 0) {\r
@@ -161,7 +161,7 @@ CVfrCompiler::OptionInitialization (
         goto Fail;\r
       }\r
       gCVfrStringDB.SetStringFileName(Argv[Index]);\r
         goto Fail;\r
       }\r
       gCVfrStringDB.SetStringFileName(Argv[Index]);\r
-      DebugMsg (NULL, 0, 9, (CHAR8 *) "Input string file path", Argv[Index]);\r
+      DebugMsg (NULL, 0, 9, (CHAR8 *) "Input string file path", (CHAR8 *) "%s", Argv[Index]);\r
     } else if ((stricmp (Argv[Index], "-g") == 0) || (stricmp (Argv[Index], "--guid") == 0)) {\r
       Index++;\r
       Status = StringToGuid (Argv[Index], &mOptions.OverrideClassGuid);\r
     } else if ((stricmp (Argv[Index], "-g") == 0) || (stricmp (Argv[Index], "--guid") == 0)) {\r
       Index++;\r
       Status = StringToGuid (Argv[Index], &mOptions.OverrideClassGuid);\r