grep-commit
[Top][All Lists]
Advanced

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

grep branch, master, updated. v2.20-49-g40e0d26


From: Jim Meyering
Subject: grep branch, master, updated. v2.20-49-g40e0d26
Date: Sat, 27 Sep 2014 17:49:12 +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 "grep".

The branch, master has been updated
       via  40e0d268606ff41814ba3e0f987239e2fad1b8e6 (commit)
      from  225362ac3967a6ca6343958d7ad395a3dee1b63c (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 -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=40e0d268606ff41814ba3e0f987239e2fad1b8e6


commit 40e0d268606ff41814ba3e0f987239e2fad1b8e6
Author: Jim Meyering <address@hidden>
Date:   Sat Sep 27 09:44:47 2014 -0700

    maint: suppress a false-positive -Wcast-align warning
    
    Building with --enable-gcc-warnings and gcc-4.9.1 would provoke this:
      grep.c:499:12: error: cast from 'const char *' to 'const uword *'\
          (aka 'const unsigned long *') increases required alignment from\
          1 to 8 [-Werror,-Wcast-align]
        for (s = (uword const *) p; ! (*s & hibyte_mask); s++)
             ^~~~~~~~~~~~~~~~~
    * src/grep.c (skip_easy_bytes): Use a pragma to suppress
    gcc's false-positive cast-alignment warning.

diff --git a/src/grep.c b/src/grep.c
index 046f17f..207bdea 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -496,8 +496,15 @@ skip_easy_bytes (char const *buf)
   for (p = buf; (uintptr_t) p % sizeof (uword) != 0; p++)
     if (*p & HIBYTE)
       return p;
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wcast-align"
+  /* We have aligned P to a uword boundary, so we can safely
+     tell gcc to suppress its cast-alignment warning.  */
   for (s = (uword const *) p; ! (*s & hibyte_mask); s++)
     continue;
+#pragma GCC diagnostic pop
+
   for (p = (char const *) s; ! (*p & HIBYTE); p++)
     continue;
   return p;

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

Summary of changes:
 src/grep.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
grep



reply via email to

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