[openssl-commits] [openssl] OpenSSL_1_0_2-stable update

Richard Levitte levitte at openssl.org
Wed Apr 8 15:59:54 UTC 2015


The branch OpenSSL_1_0_2-stable has been updated
       via  700c0eb8d9f155e526fab1310f6b5073327bf6a7 (commit)
       via  a4ba7163338f30675d7c58ed274d127ad7ac04e9 (commit)
       via  d21cbd7d5e8be3f21ffec0491b7627d02fad57ea (commit)
      from  ae50d8270026edf5b3c7f8aaa0c6677462b33d97 (commit)


- Log -----------------------------------------------------------------
commit 700c0eb8d9f155e526fab1310f6b5073327bf6a7
Author: Richard Levitte <levitte at openssl.org>
Date:   Sat Apr 4 16:53:44 2015 +0200

    Appease clang -Wshadow
    
    The macros BSWAP4 and BSWAP8 have statetemnt expressions
    implementations that use local variable names that shadow variables
    outside the macro call, generating warnings like this
    
    e_aes_cbc_hmac_sha1.c:263:14: warning: declaration shadows a local variable
          [-Wshadow]
        seqnum = BSWAP8(blocks[0].q[0]);
                 ^
    ../modes/modes_lcl.h:41:29: note: expanded from macro 'BSWAP8'
                                ^
    e_aes_cbc_hmac_sha1.c:223:12: note: previous declaration is here
        size_t ret = 0;
               ^
    
    Have clang be quiet by modifying the macro variable names slightly
    (suffixing them with an underscore).
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (cherry picked from commit 2da2a4349c1598ad0648405fe175e7846d893c45)

commit a4ba7163338f30675d7c58ed274d127ad7ac04e9
Author: Richard Levitte <levitte at openssl.org>
Date:   Sat Apr 4 16:33:20 2015 +0200

    Appease clang -Wgnu-statement-expression
    
    We use GNU statement expressions in crypto/md32_common.h, surrounded
    by checks that GNU C is indeed used to compile.  It seems that clang,
    at least on Linux, pretends to be GNU C, therefore finds the statement
    expressions and then warns about them.
    
    The solution is to have clang be quiet about it.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (cherry picked from commit 04958e84d8079fa57a782db70f003c38b5b156fd)

commit d21cbd7d5e8be3f21ffec0491b7627d02fad57ea
Author: Richard Levitte <levitte at openssl.org>
Date:   Sat Apr 4 16:22:26 2015 +0200

    Appease clang -Wempty-translation-unit
    
    ebcdic.c:284:7: warning: ISO C requires a translation unit to contain at least one
          declaration [-Wempty-translation-unit]
          ^
    1 warning generated.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (cherry picked from commit c25dea53e9db2b4956c315f85dae3f1c2854fd2b)

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

Summary of changes:
 Configure                |  2 +-
 crypto/ebcdic.c          |  2 +-
 crypto/modes/modes_lcl.h | 38 +++++++++++++++++++-------------------
 3 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/Configure b/Configure
index f776e23..f4847ae 100755
--- a/Configure
+++ b/Configure
@@ -105,7 +105,7 @@ my $usage="Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [experimenta
 
 my $gcc_devteam_warn = "-Wall -pedantic -DPEDANTIC -Wno-long-long -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Werror -DCRYPTO_MDEBUG_ALL -DCRYPTO_MDEBUG_ABORT -DREF_CHECK -DOPENSSL_NO_DEPRECATED";
 
-my $clang_disabled_warnings = "-Wno-language-extension-token -Wno-extended-offsetof -Wno-padded -Wno-shorten-64-to-32 -Wno-format-nonliteral -Wno-missing-noreturn -Wno-unused-parameter -Wno-sign-conversion -Wno-unreachable-code -Wno-conversion -Wno-documentation -Wno-missing-variable-declarations -Wno-cast-align -Wno-incompatible-pointer-types-discards-qualifiers -Wno-missing-variable-declarations -Wno-missing-field-initializers -Wno-unused-macros -Wno-disabled-macro-expansion -Wno-conditional-uninitialized -Wno-switch-enum";
+my $clang_disabled_warnings = "-Wno-language-extension-token -Wno-extended-offsetof -Wno-padded -Wno-shorten-64-to-32 -Wno-format-nonliteral -Wno-missing-noreturn -Wno-unused-parameter -Wno-sign-conversion -Wno-unreachable-code -Wno-conversion -Wno-documentation -Wno-missing-variable-declarations -Wno-cast-align -Wno-incompatible-pointer-types-discards-qualifiers -Wno-missing-variable-declarations -Wno-missing-field-initializers -Wno-unused-macros -Wno-disabled-macro-expansion -Wno-conditional-uninitialized -Wno-switch-enum -Wno-gnu-statement-expression";
 
 my $strict_warnings = 0;
 
diff --git a/crypto/ebcdic.c b/crypto/ebcdic.c
index 4b7652c..fd6df92 100644
--- a/crypto/ebcdic.c
+++ b/crypto/ebcdic.c
@@ -3,7 +3,7 @@
 #ifndef CHARSET_EBCDIC
 
 # include <openssl/e_os2.h>
-# if defined(PEDANTIC) || defined(__DECC) || defined(OPENSSL_SYS_MACOSX)
+# if defined(PEDANTIC) || defined(__DECC) || defined(OPENSSL_SYS_MACOSX) || defined(__clang__)
 static void *dummy = &dummy;
 # endif
 
diff --git a/crypto/modes/modes_lcl.h b/crypto/modes/modes_lcl.h
index 900f54c..fe14ec7 100644
--- a/crypto/modes/modes_lcl.h
+++ b/crypto/modes/modes_lcl.h
@@ -38,36 +38,36 @@ typedef unsigned char u8;
 #if !defined(PEDANTIC) && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM)
 # if defined(__GNUC__) && __GNUC__>=2
 #  if defined(__x86_64) || defined(__x86_64__)
-#   define BSWAP8(x) ({ u64 ret=(x);                    \
+#   define BSWAP8(x) ({ u64 ret_=(x);                   \
                         asm ("bswapq %0"                \
-                        : "+r"(ret));   ret;            })
-#   define BSWAP4(x) ({ u32 ret=(x);                    \
+                        : "+r"(ret_));   ret_;          })
+#   define BSWAP4(x) ({ u32 ret_=(x);                   \
                         asm ("bswapl %0"                \
-                        : "+r"(ret));   ret;            })
+                        : "+r"(ret_));   ret_;          })
 #  elif (defined(__i386) || defined(__i386__)) && !defined(I386_ONLY)
-#   define BSWAP8(x) ({ u32 lo=(u64)(x)>>32,hi=(x);     \
+#   define BSWAP8(x) ({ u32 lo_=(u64)(x)>>32,hi_=(x);   \
                         asm ("bswapl %0; bswapl %1"     \
-                        : "+r"(hi),"+r"(lo));           \
-                        (u64)hi<<32|lo;                 })
-#   define BSWAP4(x) ({ u32 ret=(x);                    \
+                        : "+r"(hi_),"+r"(lo_));         \
+                        (u64)hi_<<32|lo_;               })
+#   define BSWAP4(x) ({ u32 ret_=(x);                   \
                         asm ("bswapl %0"                \
-                        : "+r"(ret));   ret;            })
+                        : "+r"(ret_));   ret_;          })
 #  elif defined(__aarch64__)
-#   define BSWAP8(x) ({ u64 ret;                        \
+#   define BSWAP8(x) ({ u64 ret_;                       \
                         asm ("rev %0,%1"                \
-                        : "=r"(ret) : "r"(x)); ret;     })
-#   define BSWAP4(x) ({ u32 ret;                        \
+                        : "=r"(ret_) : "r"(x)); ret_;   })
+#   define BSWAP4(x) ({ u32 ret_;                       \
                         asm ("rev %w0,%w1"              \
-                        : "=r"(ret) : "r"(x)); ret;     })
+                        : "=r"(ret_) : "r"(x)); ret_;   })
 #  elif (defined(__arm__) || defined(__arm)) && !defined(STRICT_ALIGNMENT)
-#   define BSWAP8(x) ({ u32 lo=(u64)(x)>>32,hi=(x);     \
+#   define BSWAP8(x) ({ u32 lo_=(u64)(x)>>32,hi_=(x);   \
                         asm ("rev %0,%0; rev %1,%1"     \
-                        : "+r"(hi),"+r"(lo));           \
-                        (u64)hi<<32|lo;                 })
-#   define BSWAP4(x) ({ u32 ret;                        \
+                        : "+r"(hi_),"+r"(lo_));         \
+                        (u64)hi_<<32|lo_;               })
+#   define BSWAP4(x) ({ u32 ret_;                       \
                         asm ("rev %0,%1"                \
-                        : "=r"(ret) : "r"((u32)(x)));   \
-                        ret;                            })
+                        : "=r"(ret_) : "r"((u32)(x)));  \
+                        ret_;                           })
 #  endif
 # elif defined(_MSC_VER)
 #  if _MSC_VER>=1300


More information about the openssl-commits mailing list