fix compiler warning about ambiguous else
authorLee <ler762@users.sourceforge.net>
Fri, 22 Jul 2016 11:58:17 +0000 (11:58 +0000)
committerLee <ler762@users.sourceforge.net>
Fri, 22 Jul 2016 11:58:17 +0000 (11:58 +0000)
i686-w64-mingw32-gcc -c -pipe -O2 -DWINVER=0x501   -mwindows -Wall -Ipcre  parsers.c -o parsers.o
In file included from parsers.c:90:0:
strptime.h: In function 'strptime_internal':
strptime.h:538:7: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]
    if (!match_string (HERE_AM_STR, rp))
       ^

strptime.h

index 63ffe57..d505b9e 100644 (file)
@@ -535,11 +535,12 @@ strptime_internal (rp, fmt, tm, decided, era_cnt)
              *decided = raw;
            }
 #endif
-         if (!match_string (HERE_AM_STR, rp))
+         if (!match_string (HERE_AM_STR, rp)) {
            if (match_string (HERE_PM_STR, rp))
              is_pm = 1;
            else
              return NULL;
+          }
          break;
        case 'r':
 #ifdef _NL_CURRENT