[openssl-commits] [openssl] OpenSSL_1_1_0-stable update

Rich Salz rsalz at openssl.org
Tue Jun 20 17:38:45 UTC 2017


The branch OpenSSL_1_1_0-stable has been updated
       via  6fd603ab2f736dbca0dd53611335ae6d2b7012ca (commit)
       via  bd97dde41e96193aa076260fb0057e9ce0f6861b (commit)
       via  725f121dcfc31d016fa23bfffde1b6342659949e (commit)
      from  4b4bc00a00456e6d5cc8b2a26489ae905c049f41 (commit)


- Log -----------------------------------------------------------------
commit 6fd603ab2f736dbca0dd53611335ae6d2b7012ca
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)
    (cherry picked from commit 96db26919d5caff2db6340354a026f56dc6f09da)
    
    [extended tests]

commit bd97dde41e96193aa076260fb0057e9ce0f6861b
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)
    (cherry picked from commit f44903a428cc63ce88bfba26e8e4e2e9b21f058d)

commit 725f121dcfc31d016fa23bfffde1b6342659949e
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)
    (cherry picked from commit 560ad13c74fe6967991a2429d90eeeba815d1f9e)

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

Summary of changes:
 Configure                       | 7 +++----
 crypto/cast/c_enc.c             | 8 ++++----
 crypto/ec/ecp_nistz256.c        | 4 ++--
 crypto/include/internal/bn_dh.h | 6 +++---
 crypto/o_str.c                  | 2 +-
 5 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/Configure b/Configure
index f8faa67..33d2392 100755
--- a/Configure
+++ b/Configure
@@ -115,6 +115,9 @@ my $gcc_devteam_warn = "-DDEBUG_UNUSED"
         # but 'long long' type.
         . " -DPEDANTIC -pedantic -Wno-long-long"
         . " -Wall"
+        . " -Wextra"
+        . " -Wno-unused-parameter"
+        . " -Wno-missing-field-initializers"
         . " -Wsign-compare"
         . " -Wmissing-prototypes"
         . " -Wshadow"
@@ -135,15 +138,11 @@ my $gcc_devteam_warn = "-DDEBUG_UNUSED"
 #       -Wextended-offsetof -- no, needed in CMS ASN1 code
 my $clang_devteam_warn = ""
         . " -Qunused-arguments"
-        . " -Wextra"
-        . " -Wno-unused-parameter"
-        . " -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 dca3a2d..2461898 100644
--- a/crypto/ec/ecp_nistz256.c
+++ b/crypto/ec/ecp_nistz256.c
@@ -757,12 +757,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;


More information about the openssl-commits mailing list