Revision: 19113
          http://sourceforge.net/p/edk2/code/19113
Author:   lgao4
Date:     2015-12-04 03:14:14 +0000 (Fri, 04 Dec 2015)
Log Message:
-----------
MdeModulePkg: Fix VS2015 warning C4456 in RegularExpressionDxe

warning C4456: declaration of 'q' hides previous local declaration.
Update code to use the different local variable name.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <[email protected]>
Reviewed-by: Samer El-Haj-Mahmoud <[email protected]>
Acked-by: Michael Kinney <[email protected]>

Modified Paths:
--------------
    trunk/edk2/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regexec.c
    trunk/edk2/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regint.h

Modified: 
trunk/edk2/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regexec.c
===================================================================
--- trunk/edk2/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regexec.c  
2015-12-04 03:06:07 UTC (rev 19112)
+++ trunk/edk2/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regexec.c  
2015-12-04 03:14:14 UTC (rev 19113)
@@ -1442,7 +1442,7 @@
     case OP_EXACT1_IC:  MOP_IN(OP_EXACT1_IC);
       {
        int len;
-       UChar *q, lowbuf[ONIGENC_MBC_CASE_FOLD_MAXLEN];
+       UChar *q1, lowbuf[ONIGENC_MBC_CASE_FOLD_MAXLEN];
 
        DATA_ENSURE(1);
        len = ONIGENC_MBC_CASE_FOLD(encode,
@@ -1450,12 +1450,12 @@
                    case_fold_flag,
                    &s, end, lowbuf);
        DATA_ENSURE(0);
-       q = lowbuf;
+       q1 = lowbuf;
        while (len-- > 0) {
-         if (*p != *q) {
+         if (*p != *q1) {
             goto fail;
           }
-         p++; q++;
+         p++; q1++;
        }
       }
       MOP_OUT;
@@ -1531,7 +1531,7 @@
     case OP_EXACTN_IC:  MOP_IN(OP_EXACTN_IC);
       {
        int len;
-       UChar *q, *endp, lowbuf[ONIGENC_MBC_CASE_FOLD_MAXLEN];
+       UChar *qn, *endp, lowbuf[ONIGENC_MBC_CASE_FOLD_MAXLEN];
 
        GET_LENGTH_INC(tlen, p);
        endp = p + tlen;
@@ -1544,10 +1544,10 @@
                      case_fold_flag,
                      &s, end, lowbuf);
          DATA_ENSURE(0);
-         q = lowbuf;
+         qn = lowbuf;
          while (len-- > 0) {
-           if (*p != *q) goto fail;
-           p++; q++;
+           if (*p != *qn) goto fail;
+           p++; qn++;
          }
        }
       }

Modified: 
trunk/edk2/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regint.h
===================================================================
--- trunk/edk2/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regint.h   
2015-12-04 03:06:07 UTC (rev 19112)
+++ trunk/edk2/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regint.h   
2015-12-04 03:14:14 UTC (rev 19113)
@@ -329,8 +329,8 @@
 #define SIZE_BITSET        sizeof(BitSet)
 
 #define BITSET_CLEAR(bs) do {\
-  int i;\
-  for (i = 0; i < (int )BITSET_SIZE; i++) { (bs)[i] = 0; }     \
+  int id;\
+  for (id = 0; id < (int )BITSET_SIZE; id++) { (bs)[id] = 0; } \
 } while (0)
 
 #define BS_ROOM(bs,pos)            (bs)[pos / BITS_IN_ROOM]


------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to