From: Lee <ler762@users.sourceforge.net>
Date: Fri, 22 Jul 2016 11:58:17 +0000 (+0000)
Subject: fix compiler warning about ambiguous else
X-Git-Tag: v_3_0_26~48
X-Git-Url: http://www.privoxy.org/gitweb/@default-cgi@/faq/%22https:/%22show-proxy-args/static/@default-cgi@toggle?a=commitdiff_plain;h=2e8ea1c7d7f7b0c254406971c53b783cd944e6fe;p=privoxy.git

fix compiler warning about ambiguous else

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))
       ^
---

diff --git a/strptime.h b/strptime.h
index 63ffe579..d505b9e1 100644
--- a/strptime.h
+++ b/strptime.h
@@ -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