]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/Common/StringFuncs.c
Sync tool code to BuildTools project r1783.
[mirror_edk2.git] / BaseTools / Source / C / Common / StringFuncs.c
index b0ad2d165e10939337e7e3dcb382244c73618adf..f65ba96661c1152f9ceefe3cdcc572099d914dfc 100644 (file)
@@ -87,7 +87,7 @@ Returns:
   //\r
   // Remove leading whitespace\r
   //\r
-  for (Pos = String; isspace (*Pos); Pos++) {\r
+  for (Pos = String; isspace ((int)*Pos); Pos++) {\r
   }\r
   if (Pos != String) {\r
     memmove (String, Pos, strlen (Pos) + 1);\r
@@ -114,7 +114,7 @@ Returns:
   // Remove trailing whitespace\r
   //\r
   for (Pos = String + strlen (String);\r
-       ((Pos - 1) >= String) && (isspace (*(Pos - 1)));\r
+       ((Pos - 1) >= String) && (isspace ((int)*(Pos - 1)));\r
        Pos--\r
       ) {\r
   }\r
@@ -160,12 +160,12 @@ Returns:
   Output = NewStringList ();\r
 \r
   for (Pos = String, Item = 0; Pos < EndOfString; Item++) {\r
-    while (isspace (*Pos)) {\r
+    while (isspace ((int)*Pos)) {\r
       Pos++;\r
     }\r
 \r
     for (EndOfSubString=Pos;\r
-         (*EndOfSubString != '\0') && !isspace (*EndOfSubString);\r
+         (*EndOfSubString != '\0') && !isspace ((int)*EndOfSubString);\r
          EndOfSubString++\r
          ) {\r
     }\r