m4-commit
[Top][All Lists]
Advanced

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

[SCM] GNU M4 source repository branch, branch-1.6, updated. v1.5.89a-166


From: Eric Blake
Subject: [SCM] GNU M4 source repository branch, branch-1.6, updated. v1.5.89a-166-gea03ca2
Date: Mon, 30 Aug 2010 22:27:55 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU M4 source repository".

http://git.sv.gnu.org/gitweb/?p=m4.git;a=commitdiff;h=ea03ca2db779dcdb8f05749568f94dc1f735c539

The branch, branch-1.6 has been updated
       via  ea03ca2db779dcdb8f05749568f94dc1f735c539 (commit)
      from  5f6cb7045448cf3d06bf7e1881406401b2084279 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ea03ca2db779dcdb8f05749568f94dc1f735c539
Author: Eric Blake <address@hidden>
Date:   Mon Aug 30 15:58:58 2010 -0600

    Clean up compiler warnings.
    
    * src/builtin.c (m4_patsubst): Drop dead store.
    * src/eval.c (unary_term): Likewise.
    * src/input.c (match_input): Likewise.
    * src/symtab.c (symtab_debug): Drop useless casts to void.
    * src/m4.c (main): Add hints to aid clang analysis.
    
    Signed-off-by: Eric Blake <address@hidden>
    (cherry picked from commit dadaf5f2d58ffd484bd5141fc808552b8f17467d)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog     |    7 +++++++
 src/builtin.c |    1 -
 src/eval.c    |    3 +--
 src/input.c   |    2 +-
 src/m4.c      |    4 ++++
 src/symtab.c  |    5 +----
 6 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8853fc6..5e5889e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2010-08-30  Eric Blake  <address@hidden>
 
+       Clean up compiler warnings.
+       * src/builtin.c (m4_patsubst): Drop dead store.
+       * src/eval.c (unary_term): Likewise.
+       * src/input.c (match_input): Likewise.
+       * src/symtab.c (symtab_debug): Drop useless casts to void.
+       * src/m4.c (main): Add hints to aid clang analysis.
+
        Test previous commit.
        * doc/m4.texinfo (Format): Add a test.
        * NEWS: Document the fix.
diff --git a/src/builtin.c b/src/builtin.c
index 77e4ab0..bc0cde2 100644
--- a/src/builtin.c
+++ b/src/builtin.c
@@ -2321,7 +2321,6 @@ m4_patsubst (struct obstack *obs, int argc, 
macro_arguments *argv)
   length = ARG_LEN (1);
 
   offset = 0;
-  matchpos = 0;
   while (offset <= length)
     {
       matchpos = re_search (buf, victim, length,
diff --git a/src/eval.c b/src/eval.c
index ac2c83b..f95ce20 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -843,12 +843,11 @@ exp_term (const call_info *me, eval_token et, int32_t *v1)
 static eval_error
 unary_term (const call_info *me, eval_token et, int32_t *v1)
 {
-  eval_token et2 = et;
   eval_error er;
 
   if (et == PLUS || et == MINUS || et == NOT || et == LNOT)
     {
-      et2 = eval_lex (v1);
+      eval_token et2 = eval_lex (v1);
       if (et2 == ERROR)
         return UNKNOWN_INPUT;
 
diff --git a/src/input.c b/src/input.c
index 5ffdbe3..04f0991 100644
--- a/src/input.c
+++ b/src/input.c
@@ -1373,7 +1373,7 @@ match_input (const char *s, size_t slen, bool consume)
     }
 
   next_char (false, false);
-  for (n = 1, t = s++; (ch = peek_input (false)) == to_uchar (*s++); )
+  for (n = 1, t = s++; peek_input (false) == to_uchar (*s++); )
     {
       next_char (false, false);
       n++;
diff --git a/src/m4.c b/src/m4.c
index e4a941c..92eede1 100644
--- a/src/m4.c
+++ b/src/m4.c
@@ -606,6 +606,7 @@ main (int argc, char *const *argv, char *const *envp 
M4_GNUC_UNUSED)
       switch (defines->code)
         {
         case 'D':
+          assert (arg);
           {
             const char *value = strchr (arg, '=');
             size_t len = value ? (size_t) (value - arg) : strlen (arg);
@@ -615,6 +616,7 @@ main (int argc, char *const *argv, char *const *envp 
M4_GNUC_UNUSED)
           break;
 
         case 'U':
+          assert (arg);
           lookup_symbol (arg, strlen (arg), SYMBOL_DELETE);
           break;
 
@@ -625,6 +627,7 @@ main (int argc, char *const *argv, char *const *envp 
M4_GNUC_UNUSED)
           break;
 
         case 't':
+          assert (arg);
           sym = lookup_symbol (arg, strlen (arg), SYMBOL_INSERT);
           SYMBOL_TRACED (sym) = true;
           break;
@@ -634,6 +637,7 @@ main (int argc, char *const *argv, char *const *envp 
M4_GNUC_UNUSED)
           break;
 
         case '\1':
+          assert (arg);
           process_file (arg);
           break;
 
diff --git a/src/symtab.c b/src/symtab.c
index 006bdc2..f780707 100644
--- a/src/symtab.c
+++ b/src/symtab.c
@@ -438,10 +438,7 @@ symtab_debug (void)
       if (s == NULL)
         xprintf ("Name `%s' is unknown\n", text);
 
-      if (delete)
-        lookup_symbol (text, len, SYMBOL_DELETE);
-      else
-        lookup_symbol (text, len, SYMBOL_INSERT);
+      lookup_symbol (text, len, delete ? SYMBOL_DELETE : SYMBOL_INSERT);
     }
   symtab_print_list (i++);
 }


hooks/post-receive
-- 
GNU M4 source repository



reply via email to

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