[git] GCRYPT - branch, master, updated. libgcrypt-1.5.0-313-gc89ab92

by Jussi Kivilinna cvs at cvs.gnupg.org
Wed Oct 16 20:22:16 CEST 2013


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 "The GNU crypto library".

The branch, master has been updated
       via  c89ab921ccfaefe6c4f6a724d01e0df41a1a381f (commit)
      from  83902f1f1dbc8263a0c3f61be59cd2eb95293c97 (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 c89ab921ccfaefe6c4f6a724d01e0df41a1a381f
Author: Jussi Kivilinna <jussi.kivilinna at iki.fi>
Date:   Wed Oct 16 21:16:15 2013 +0300

    Avoid void* pointer arithmetic
    
    * tests/tsexp.c (check_extract_param): Cast void* pointers to char*
    before doing arithmetics.
    --
    
    GCC was complaining:
    tsexp.c: In function ‘check_extract_param’:
    tsexp.c:938:44: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
    tsexp.c:944:46: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
    tsexp.c:955:44: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
    tsexp.c:961:46: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
    
    Signed-off-by: Jussi Kivilinna <jussi.kivilinna at iki.fi>

diff --git a/tests/tsexp.c b/tests/tsexp.c
index 8a6b912..afa79ff 100644
--- a/tests/tsexp.c
+++ b/tests/tsexp.c
@@ -935,13 +935,14 @@ check_extract_param (void)
         fail ("gcry_sexp_extract_param/desc failed: A off changed");
       else if (ioarray[1].len != 1)
         fail ("gcry_sexp_extract_param/desc failed: A has wrong length");
-      else if (cmp_bufhex (ioarray[1].data + ioarray[1].off, ioarray[1].len,
-                           sample1_a))
+      else if (cmp_bufhex ((char *)ioarray[1].data + ioarray[1].off,
+                           ioarray[1].len, sample1_a))
         {
           fail ("gcry_sexp_extract_param/desc failed: A mismatch");
           gcry_log_debug    ("expected: %s\n", sample1_a);
           gcry_log_debughex ("     got",
-                             ioarray[1].data + ioarray[1].off, ioarray[1].len);
+                             (char *)ioarray[1].data + ioarray[1].off,
+                             ioarray[1].len);
         }
 
       if (!ioarray[2].data)
@@ -952,13 +953,14 @@ check_extract_param (void)
         fail ("gcry_sexp_extract_param/desc failed: B off changed");
       else if (ioarray[2].len != 32)
         fail ("gcry_sexp_extract_param/desc failed: B has wrong length");
-      else if (cmp_bufhex (ioarray[2].data + ioarray[2].off, ioarray[2].len,
-                           sample1_b))
+      else if (cmp_bufhex ((char *)ioarray[2].data + ioarray[2].off,
+                           ioarray[2].len, sample1_b))
         {
           fail ("gcry_sexp_extract_param/desc failed: B mismatch");
           gcry_log_debug    ("expected: %s\n", sample1_b);
           gcry_log_debughex ("     got",
-                             ioarray[2].data + ioarray[2].off, ioarray[2].len);
+                             (char *)ioarray[2].data + ioarray[2].off,
+                             ioarray[2].len);
         }
 
       xfree (ioarray[0].data);

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

Summary of changes:
 tests/tsexp.c |   14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
The GNU crypto library
http://git.gnupg.org


_______________________________________________
Gnupg-commits mailing list
Gnupg-commits at gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-commits


More information about the Gcrypt-devel mailing list