Fix travis builds on master
authorAlessandro Ghedini <alessandro@ghedini.me>
Tue, 6 Oct 2015 16:23:42 +0000 (12:23 -0400)
committerRich Salz <rsalz@openssl.org>
Tue, 6 Oct 2015 16:30:47 +0000 (12:30 -0400)
-Allow mingw debug builds to fail on Travis CI
-Fix Travis email notifications config
-Rename a variable to avoid a bogus warning with old GCC
 error: declaration of ``dup'' shadows a global declaration [-Werror=shadow]
-Disable pedantic ms-format warnings with mingw
-Properly define const DH parameters
-Restore --debug flag in Travis CI builds; -d would get incorrectly passed
 to ./Configure in mingw debug builds.

Signed-off-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
.travis.yml
Configurations/10-main.conf
crypto/bn/bn_dh.c
test/packettest.c

index 3125363..34b4d9d 100644 (file)
@@ -18,7 +18,7 @@ compiler:
 env:
     - CONFIG_OPTS=""
     - CONFIG_OPTS="shared"
-    - CONFIG_OPTS="-d --strict-warnings"
+    - CONFIG_OPTS="--debug --strict-warnings"
 
 matrix:
     exclude:
@@ -26,6 +26,11 @@ matrix:
           compiler: i686-w64-mingw32-gcc
         - os: osx
           compiler: x86_64-w64-mingw32-gcc
+    allow_failures:
+        - compiler: i686-w64-mingw32-gcc
+          env: CONFIG_OPTS="--debug --strict-warnings"
+        - compiler: x86_64-w64-mingw32-gcc
+          env: CONFIG_OPTS="--debug --strict-warnings"
 
 before_script:
     - if [ "$CC" == i686-w64-mingw32-gcc ]; then
@@ -43,8 +48,5 @@ script:
     - if [ -z "$CROSS_COMPILE" ]; then make test; fi
 
 notifications:
-    recipient:
-        - openssl-commits@openssl.org
     email:
-        on_success: change
-        on_failure: always
+        - openssl-commits@openssl.org
index 426fbfa..9ebd20f 100644 (file)
     "mingw" => {
         inherit_from     => [ asm("x86_asm") ],
         cc               => "gcc",
-        cflags           => "-mno-cygwin -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -march=i486 -Wall",
+        cflags           => "-mno-cygwin -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -march=i486 -Wall -Wno-pedantic-ms-format",
         debug_cflags     => "-g -O0",
         release_clags    => "-O3 -fomit-frame-pointer",
         thread_cflag     => "-D_MT",
         # Applink is never engaged and can as well be omitted.
         inherit_from     => [ asm("x86_64_asm") ],
         cc               => "gcc",
-        cflags           => "-mno-cygwin -DL_ENDIAN -Wall -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE",
+        cflags           => "-mno-cygwin -DL_ENDIAN -Wall -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -Wno-pedantic-ms-format",
         debug_cflags     => "-g -O0",
         release_clags    => "-O3",
         thread_cflag     => "-D_MT",
index 34f9fb0..5572a2d 100644 (file)
@@ -248,7 +248,8 @@ static const BN_ULONG dh2048_256_q[] = {
 
 /* Macro to make a BIGNUM from static data */
 
-# define make_dh_bn(x) const BIGNUM _bignum_##x = { (BN_ULONG *) x, \
+# define make_dh_bn(x) extern const BIGNUM _bignum_##x; \
+                       const BIGNUM _bignum_##x = { (BN_ULONG *) x, \
                         OSSL_NELEM(x),\
                         OSSL_NELEM(x),\
                         0, BN_FLG_STATIC_DATA };
index 915b42b..edaa282 100644 (file)
@@ -242,16 +242,16 @@ static int test_PACKET_copy_bytes(unsigned char buf[BUF_LEN])
 
 static int test_PACKET_copy_all(unsigned char buf[BUF_LEN])
 {
-    unsigned char dup[BUF_LEN];
+    unsigned char tmp[BUF_LEN];
     PACKET pkt;
     size_t len;
 
     if (       !PACKET_buf_init(&pkt, buf, BUF_LEN)
-               || !PACKET_copy_all(&pkt, dup, BUF_LEN, &len)
+               || !PACKET_copy_all(&pkt, tmp, BUF_LEN, &len)
                || len != BUF_LEN
-               || memcmp(buf, dup, BUF_LEN) != 0
+               || memcmp(buf, tmp, BUF_LEN) != 0
                || PACKET_remaining(&pkt) != BUF_LEN
-               || PACKET_copy_all(&pkt, dup, BUF_LEN - 1, &len)) {
+               || PACKET_copy_all(&pkt, tmp, BUF_LEN - 1, &len)) {
         fprintf(stderr, "test_PACKET_copy_bytes() failed\n");
         return 0;
     }