[git] GPGME - branch, master, updated. gpgme-1.12.0-112-g8b41fb0

by Werner Koch cvs at cvs.gnupg.org
Mon Dec 17 16:51:25 CET 2018


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 "GnuPG Made Easy".

The branch, master has been updated
       via  8b41fb08f00f01fe0dd8b2b5455d3422d97ddc60 (commit)
      from  fbc298dc1b0fbb51ebc92a9d56c45b78c5e9989d (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 8b41fb08f00f01fe0dd8b2b5455d3422d97ddc60
Author: Werner Koch <wk at gnupg.org>
Date:   Mon Dec 17 16:47:06 2018 +0100

    core: Silence newer compiler warnings.
    
    * configure.ac: Add -Wno-format-truncation and
      -Wno-sizeof-pointer-div.
    * src/b64dec.c (_gpgme_b64dec_proc): Add fallthrough annotation.
    * src/cJSON.c (parse_string): Ditto.
    * src/gpgme-json.c (main): Ditto.
    --
    
    gcc 8 enables a couple of new warnings.  Some of them are useless for
    us.  In particular:
    
      util.h:42:26: warning: division 'sizeof (char *) / sizeof (char)'
      does not compute the number of array elements [-Wsizeof-pointer-div]
      #define DIM(v) (sizeof(v)/sizeof((v)[0])) ^
    
      trustlist.c:101:22: note:
      in expansion of macro 'DIM' if (strlen (p) == DIM(item->keyid) - 1)
    
    Which is a real standard way to use DIM, here the right hand side is
    equivalent to sizeof but nevertheless it is correct.  Yes sir, we know
    C.
    
    The format string warnings I have seen were assuming that the time
    structure returns valued out of scope - but if the system is that
    broken, the s_n_printf catches this.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/configure.ac b/configure.ac
index 1b607e0..ff37794 100644
--- a/configure.ac
+++ b/configure.ac
@@ -582,6 +582,8 @@ if test "$GCC" = yes; then
           CFLAGS="$CFLAGS -Wno-missing-field-initializers"
           CFLAGS="$CFLAGS -Wno-sign-compare"
           CFLAGS="$CFLAGS -Wno-format-zero-length"
+          CFLAGS="$CFLAGS -Wno-format-truncation"
+          CFLAGS="$CFLAGS -Wno-sizeof-pointer-div"
         fi
         CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wno-shadow"
 
diff --git a/src/b64dec.c b/src/b64dec.c
index 1b845ee..66ab2ec 100644
--- a/src/b64dec.c
+++ b/src/b64dec.c
@@ -118,6 +118,7 @@ _gpgme_b64dec_proc (struct b64state *state, void *buffer, size_t length,
           break;
         case s_init:
           ds = s_lfseen;
+          /*FALLTHRU*/
         case s_lfseen:
           if (*s != "-----BEGIN "[pos])
             {
diff --git a/src/cJSON.c b/src/cJSON.c
index 9e53012..64a54c7 100644
--- a/src/cJSON.c
+++ b/src/cJSON.c
@@ -352,12 +352,15 @@ parse_string (cJSON * item, const char *str, const char **ep)
 		case 4:
 		  *--ptr2 = ((uc | 0x80) & 0xBF);
 		  uc >>= 6;
+                  /*FALLTHRU*/
 		case 3:
 		  *--ptr2 = ((uc | 0x80) & 0xBF);
 		  uc >>= 6;
+                  /*FALLTHRU*/
 		case 2:
 		  *--ptr2 = ((uc | 0x80) & 0xBF);
 		  uc >>= 6;
+                  /*FALLTHRU*/
 		case 1:
 		  *--ptr2 = (uc | firstByteMark[len]);
 		}
diff --git a/src/gpgme-json.c b/src/gpgme-json.c
index a7e3d5f..e4ae81d 100644
--- a/src/gpgme-json.c
+++ b/src/gpgme-json.c
@@ -3861,7 +3861,7 @@ main (int argc, char *argv[])
         {
         case CMD_INTERACTIVE:
           opt_interactive = 1;
-          /* Fall trough.  */
+          /*FALLTHROUGH*/
         case CMD_SINGLE:
         case CMD_LIBVERSION:
           cmd = pargs.r_opt;

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

Summary of changes:
 configure.ac     | 2 ++
 src/b64dec.c     | 1 +
 src/cJSON.c      | 3 +++
 src/gpgme-json.c | 2 +-
 4 files changed, 7 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
GnuPG Made Easy
http://git.gnupg.org




More information about the Gnupg-commits mailing list