]> git.proxmox.com Git - mirror_edk2.git/blobdiff - StdLib/LibC/Main/Main.c
EADK (StdLib, AppPkg, StdLibPrivateInternalFiles): Python Beta Release.
[mirror_edk2.git] / StdLib / LibC / Main / Main.c
index 59a72bd6308d26d5229382dd6a1f3b1d081eac15..523965fa4368b53d975b3b99027d34593954747b 100644 (file)
@@ -4,7 +4,7 @@
   All of the global data in the gMD structure is initialized to 0, NULL, or\r
   SIG_DFL; as appropriate.\r
 \r
-  Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials are licensed and made available under\r
   the terms and conditions of the BSD License that accompanies this distribution.\r
   The full text of the license may be found at\r
@@ -74,7 +74,7 @@ static
 char **\r
 ArgvConvert(UINTN Argc, CHAR16 **Argv)\r
 {\r
-  size_t  AVsz;       /* Size of a single nArgv string */\r
+  ssize_t  AVsz;       /* Size of a single nArgv string, or -1 */\r
   UINTN   count;\r
   char  **nArgv;\r
   char   *string;\r
@@ -90,7 +90,7 @@ DEBUG_CODE_END();
   nArgvSize = Argc;\r
   /* Determine space needed for narrow Argv strings. */\r
   for(count = 0; count < Argc; ++count) {\r
-    AVsz = wcstombs(NULL, Argv[count], ARG_MAX);\r
+    AVsz = (ssize_t)wcstombs(NULL, Argv[count], ARG_MAX);\r
     if(AVsz < 0) {\r
       Print(L"ABORTING: Argv[%d] contains an unconvertable character.\n", count);\r
       exit(EXIT_FAILURE);\r