bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 8/8] build: pacify syntax-check


From: Akim Demaille
Subject: [PATCH 8/8] build: pacify syntax-check
Date: Mon, 10 Feb 2020 20:49:16 +0100

* src/complain.c: Fix indentation.
* cfg.mk: Using strcmp is ok in the tests.
Test cases and examples don't need Bison's PO support.
---
 cfg.mk         | 4 ++--
 src/complain.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index 0e5716cf..8b22f03b 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -156,7 +156,7 @@ exclude = \
 $(call exclude,                                                                
 \
   bindtextdomain=^lib/main.c$$                                                 
 \
   cast_of_argument_to_free=^src/muscle-tab.c$$                                 
 \
-  po_check=(^po/POTFILES.in|.md)$$                                             
\
+  po_check=^(examples|tests)/|(^po/POTFILES.in|.md)$$                          
 \
   preprocessor_indentation=^data/|^lib/|^src/parse-gram.[ch]$$                 
 \
   program_name=^lib/main.c$$                                                   
 \
   prohibit_always-defined_macros=^data/skeletons/yacc.c$$                      
 \
@@ -165,7 +165,7 @@ $(call exclude,
   prohibit_doubled_word=^tests/named-refs.at$$                                 
 \
   prohibit_magic_number_exit=^doc/bison.texi$$                                 
 \
   prohibit_magic_number_exit+=?|^tests/(conflicts|regression).at$$             
 \
-  prohibit_strcmp=^doc/bison\.texi|examples|tests/local\.at$$                  
 \
+  prohibit_strcmp=^doc/bison\.texi|examples|tests                              
 \
   
prohibit_tab_based_indentation=install-icc.sh|\.(am|mk)$$|^\.git|tests/input.at|Makefile$$
   \
   require_config_h=^(lib/yyerror|data/skeletons/(glr|yacc))\.c$$               
 \
   require_config_h_first=^(lib/yyerror|data/skeletons/(glr|yacc))\.c$$         
 \
diff --git a/src/complain.c b/src/complain.c
index b8ba420e..dbf243e7 100644
--- a/src/complain.c
+++ b/src/complain.c
@@ -604,7 +604,7 @@ syntax_error (location loc,
   const char *format = NULL;
   switch (argc)
     {
-# define CASE(N, S)                         \
+#define CASE(N, S)                          \
       case N:                               \
         format = S;                         \
         break
@@ -615,7 +615,7 @@ syntax_error (location loc,
       CASE (3, _("expected %1$s or %2$s before %0$s"));
       CASE (4, _("expected %1$s or %2$s or %3$s before %0$s"));
       CASE (5, _("expected %1$s or %2$s or %4$s or %5$s before %0$s"));
-# undef CASE
+#undef CASE
     }
   location_print (loc, stderr);
   fputs (": ", stderr);
-- 
2.25.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]