[openssl-commits] [openssl] master update

Rich Salz rsalz at openssl.org
Mon May 1 18:32:40 UTC 2017


The branch master has been updated
       via  96db26919d5caff2db6340354a026f56dc6f09da (commit)
       via  f44903a428cc63ce88bfba26e8e4e2e9b21f058d (commit)
       via  560ad13c74fe6967991a2429d90eeeba815d1f9e (commit)
      from  1ff86c5efa946427e20b3504c460e83edbe53905 (commit)


- Log -----------------------------------------------------------------
commit 96db26919d5caff2db6340354a026f56dc6f09da
Author: Benjamin Kaduk <bkaduk at akamai.com>
Date:   Mon May 1 12:39:20 2017 -0500

    Remove duplicates from clang_devteam_warnings
    
    Since the clang_devteam_warnings are appended to the gcc_devteam_warnings
    when strict-warnings are requested, any items present in both the gcc
    and clang variables will be duplicated in the cflags used for clang builds.
    Remove the extra copy from the clang-specific flags in favor of the
    gcc_devteam_warnings that are used for all strict-warnings builds.
    
    Reviewed-by: Andy Polyakov <appro at openssl.org>
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/3239)

commit f44903a428cc63ce88bfba26e8e4e2e9b21f058d
Author: Benjamin Kaduk <bkaduk at akamai.com>
Date:   Fri Apr 14 11:53:04 2017 -0500

    Address some -Wold-style-declaration warnings
    
    gcc's -Wextra pulls in -Wold-style-declaration, which triggers when a
    declaration has a storage-class specifier as a non-initial qualifier.
    The ISO C formal grammar requires the storage-class to be the first
    component of the declaration, if present.
    
    Seeint as the register storage-class specifier does not really have any effect
    anymore with modern compilers, remove it entirely while we're here, instead of
    fixing up the order.
    
    Interestingly, the gcc devteam warnings do not pull in -Wextra, though
    the clang ones do.
    
    [extended tests]
    
    Reviewed-by: Andy Polyakov <appro at openssl.org>
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/3239)

commit 560ad13c74fe6967991a2429d90eeeba815d1f9e
Author: Benjamin Kaduk <bkaduk at akamai.com>
Date:   Tue Apr 18 10:48:11 2017 -0500

    Add -Wextra to gcc devteam warnings
    
    clang already has it; let's flip the switch and deal with the fallout.
    Exclude -Wunused-parameter, as we have many places where we keep unused
    parameters to conform to a uniform vtable-like interface.
    Also exclude -Wmissing-field-initializers; it's okay to rely on
    the standard-mandated behavior of filling out with 0/NULL.
    
    Reviewed-by: Andy Polyakov <appro at openssl.org>
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/3239)

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

Summary of changes:
 Configure                       |  9 ++++-----
 crypto/cast/c_enc.c             |  8 ++++----
 crypto/ec/ecp_nistz256.c        |  4 ++--
 crypto/include/internal/bn_dh.h |  6 +++---
 crypto/o_str.c                  |  2 +-
 test/chacha_internal_test.c     |  6 +++---
 test/wpackettest.c              | 18 +++++++++---------
 7 files changed, 26 insertions(+), 27 deletions(-)

diff --git a/Configure b/Configure
index c699ae0..24dbde8 100755
--- a/Configure
+++ b/Configure
@@ -119,6 +119,9 @@ my $gcc_devteam_warn = "-DDEBUG_UNUSED"
         . " -Wswitch"
         . " -DPEDANTIC -pedantic -Wno-long-long"
         . " -Wall"
+        . " -Wextra"
+        . " -Wno-unused-parameter"
+        . " -Wno-missing-field-initializers"
         . " -Wsign-compare"
         . " -Wmissing-prototypes"
         . " -Wshadow"
@@ -138,17 +141,13 @@ my $gcc_devteam_warn = "-DDEBUG_UNUSED"
 #       -Wextended-offsetof -- no, needed in CMS ASN1 code
 my $clang_devteam_warn = ""
         . " -Qunused-arguments"
-        . " -Wextra"
-        . " -Wswitch -Wswitch-default"
-        . " -Wno-unused-parameter"
+        . " -Wswitch-default"
         . " -Wno-parentheses-equality"
-        . " -Wno-missing-field-initializers"
         . " -Wno-language-extension-token"
         . " -Wno-extended-offsetof"
         . " -Wconditional-uninitialized"
         . " -Wincompatible-pointer-types-discards-qualifiers"
         . " -Wmissing-variable-declarations"
-        . " -Wundef"
         ;
 
 # This adds backtrace information to the memory leak info.  Is only used
diff --git a/crypto/cast/c_enc.c b/crypto/cast/c_enc.c
index 9a85812..700b6d1 100644
--- a/crypto/cast/c_enc.c
+++ b/crypto/cast/c_enc.c
@@ -12,8 +12,8 @@
 
 void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key)
 {
-    register CAST_LONG l, r, t;
-    const register CAST_LONG *k;
+    CAST_LONG l, r, t;
+    const CAST_LONG *k;
 
     k = &(key->data[0]);
     l = data[0];
@@ -44,8 +44,8 @@ void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key)
 
 void CAST_decrypt(CAST_LONG *data, const CAST_KEY *key)
 {
-    register CAST_LONG l, r, t;
-    const register CAST_LONG *k;
+    CAST_LONG l, r, t;
+    const CAST_LONG *k;
 
     k = &(key->data[0]);
     l = data[0];
diff --git a/crypto/ec/ecp_nistz256.c b/crypto/ec/ecp_nistz256.c
index 5c8affa..665ca35 100644
--- a/crypto/ec/ecp_nistz256.c
+++ b/crypto/ec/ecp_nistz256.c
@@ -767,12 +767,12 @@ __owur static int ecp_nistz256_windowed_mul(const EC_GROUP *group,
 }
 
 /* Coordinates of G, for which we have precomputed tables */
-const static BN_ULONG def_xG[P256_LIMBS] = {
+static const BN_ULONG def_xG[P256_LIMBS] = {
     TOBN(0x79e730d4, 0x18a9143c), TOBN(0x75ba95fc, 0x5fedb601),
     TOBN(0x79fb732b, 0x77622510), TOBN(0x18905f76, 0xa53755c6)
 };
 
-const static BN_ULONG def_yG[P256_LIMBS] = {
+static const BN_ULONG def_yG[P256_LIMBS] = {
     TOBN(0xddf25357, 0xce95560a), TOBN(0x8b4ab8e4, 0xba19e45c),
     TOBN(0xd2e88688, 0xdd21f325), TOBN(0x8571ff18, 0x25885d85)
 };
diff --git a/crypto/include/internal/bn_dh.h b/crypto/include/internal/bn_dh.h
index b4bca40..f49f039 100644
--- a/crypto/include/internal/bn_dh.h
+++ b/crypto/include/internal/bn_dh.h
@@ -8,9 +8,9 @@
  */
 
 #define declare_dh_bn(x) \
-    const extern BIGNUM _bignum_dh##x##_p;              \
-    const extern BIGNUM _bignum_dh##x##_g;              \
-    const extern BIGNUM _bignum_dh##x##_q;
+    extern const BIGNUM _bignum_dh##x##_p;              \
+    extern const BIGNUM _bignum_dh##x##_g;              \
+    extern const BIGNUM _bignum_dh##x##_q;
 
 declare_dh_bn(1024_160)
 declare_dh_bn(2048_224)
diff --git a/crypto/o_str.c b/crypto/o_str.c
index d8516c2..528655a 100644
--- a/crypto/o_str.c
+++ b/crypto/o_str.c
@@ -193,7 +193,7 @@ unsigned char *OPENSSL_hexstr2buf(const char *str, long *len)
  */
 char *OPENSSL_buf2hexstr(const unsigned char *buffer, long len)
 {
-    const static char hexdig[] = "0123456789ABCDEF";
+    static const char hexdig[] = "0123456789ABCDEF";
     char *tmp, *q;
     const unsigned char *p;
     int i;
diff --git a/test/chacha_internal_test.c b/test/chacha_internal_test.c
index de8e4b2..e3d1c49 100644
--- a/test/chacha_internal_test.c
+++ b/test/chacha_internal_test.c
@@ -17,16 +17,16 @@
 #include "testutil.h"
 #include "internal/chacha.h"
 
-const static unsigned int key[] = {
+static const unsigned int key[] = {
     0x03020100, 0x07060504, 0x0b0a0908, 0x0f0e0d0c,
     0x13121110, 0x17161514, 0x1b1a1918, 0x1f1e1d1c
 };
 
-const static unsigned int ivp[] = {
+static const unsigned int ivp[] = {
     0x00000000, 0x00000000, 0x03020100, 0x07060504
 };
 
-const static unsigned char ref[] = {
+static const unsigned char ref[] = {
     0xf7, 0x98, 0xa1, 0x89, 0xf1, 0x95, 0xe6, 0x69,
     0x82, 0x10, 0x5f, 0xfb, 0x64, 0x0b, 0xb7, 0x75,
     0x7f, 0x57, 0x9d, 0xa3, 0x16, 0x02, 0xfc, 0x93,
diff --git a/test/wpackettest.c b/test/wpackettest.c
index a0872c5..5c7ea10 100644
--- a/test/wpackettest.c
+++ b/test/wpackettest.c
@@ -23,15 +23,15 @@
 
 #include "testutil.h"
 
-const static unsigned char simple1[] = { 0xff };
-const static unsigned char simple2[] = { 0x01, 0xff };
-const static unsigned char simple3[] = { 0x00, 0x00, 0x00, 0x01, 0xff };
-const static unsigned char nestedsub[] = { 0x03, 0xff, 0x01, 0xff };
-const static unsigned char seqsub[] = { 0x01, 0xff, 0x01, 0xff };
-const static unsigned char empty[] = { 0x00 };
-const static unsigned char alloc[] = { 0x02, 0xfe, 0xff };
-const static unsigned char submem[] = { 0x03, 0x02, 0xfe, 0xff };
-const static unsigned char fixed[] = { 0xff, 0xff, 0xff };
+static const unsigned char simple1[] = { 0xff };
+static const unsigned char simple2[] = { 0x01, 0xff };
+static const unsigned char simple3[] = { 0x00, 0x00, 0x00, 0x01, 0xff };
+static const unsigned char nestedsub[] = { 0x03, 0xff, 0x01, 0xff };
+static const unsigned char seqsub[] = { 0x01, 0xff, 0x01, 0xff };
+static const unsigned char empty[] = { 0x00 };
+static const unsigned char alloc[] = { 0x02, 0xfe, 0xff };
+static const unsigned char submem[] = { 0x03, 0x02, 0xfe, 0xff };
+static const unsigned char fixed[] = { 0xff, 0xff, 0xff };
 
 static BUF_MEM *buf;
 


More information about the openssl-commits mailing list