summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-04-03 12:24:33 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-04-03 12:24:33 (GMT)
commita8cd4d482f2f0e5954ee39abdc191cb2ab1cb4ce (patch)
treea90a506893e582868f5dd7c7e42892e62e83d4e9 /Parser
parent4deb950e2b354781ccaf8829a27067a04a3e4623 (diff)
downloadcpython-a8cd4d482f2f0e5954ee39abdc191cb2ab1cb4ce.zip
cpython-a8cd4d482f2f0e5954ee39abdc191cb2ab1cb4ce.tar.gz
cpython-a8cd4d482f2f0e5954ee39abdc191cb2ab1cb4ce.tar.bz2
Got rid of warnings "suggest braces around empty body in an ‘else’ statement"
in Parser/pgen.c.
Diffstat (limited to 'Parser')
-rw-r--r--Parser/pgen.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Parser/pgen.c b/Parser/pgen.c
index b2f8470..f3031ae 100644
--- a/Parser/pgen.c
+++ b/Parser/pgen.c
@@ -136,11 +136,12 @@ addnfa(nfagrammar *gr, char *name)
static char REQNFMT[] = "metacompile: less than %d children\n";
-#define REQN(i, count) \
+#define REQN(i, count) do { \
if (i < count) { \
fprintf(stderr, REQNFMT, count); \
Py_FatalError("REQN"); \
- } else
+ } \
+} while (0)
#else
#define REQN(i, count) /* empty */