[openssl-commits] [openssl] master update
Ben Laurie
ben at openssl.org
Fri May 1 16:46:33 UTC 2015
The branch master has been updated
via 190c8c60c11467424910605d8d0098ccc1168fdc (commit)
via 8b68b7e97bea1bb19ae5ad9afc7fdb5547bd4fc7 (commit)
via dc2a1af86abbd0e464f952250c749d37e009eead (commit)
from efa7dd64443f246004751bdaa5671bf6836e07ff (commit)
- Log -----------------------------------------------------------------
commit 190c8c60c11467424910605d8d0098ccc1168fdc
Author: Ben Laurie <ben at links.org>
Date: Sun Apr 19 14:10:54 2015 +0100
Fix build on MacOS.
Reviewed-by: Andy Polyakov
commit 8b68b7e97bea1bb19ae5ad9afc7fdb5547bd4fc7
Author: Ben Laurie <ben at links.org>
Date: Sun Apr 19 14:34:05 2015 +0100
Use BN_ULONG format.
Reviewed-by: Andy Polyakov
commit dc2a1af86abbd0e464f952250c749d37e009eead
Author: Ben Laurie <ben at links.org>
Date: Sun Apr 19 14:30:56 2015 +0100
u_len may be unused.
Reviewed-by: Andy Polyakov
-----------------------------------------------------------------------
Summary of changes:
Configurations/10-main.conf | 9 +--------
Configure | 21 +++++++++++++++++++--
config | 6 ++++--
ssl/record/rec_layer_s3.c | 2 +-
test/bntest.c | 4 ++--
5 files changed, 27 insertions(+), 15 deletions(-)
diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf
index 025bd86..372080c 100644
--- a/Configurations/10-main.conf
+++ b/Configurations/10-main.conf
@@ -641,14 +641,7 @@
"linux-x86_64-clang" => {
inherit_from => [ "linux-x86_64" ],
cc => "clang",
- # TODO(openssl-team): fix problems and investigate if (at least) the
- # following warnings can also be enabled:
- # -Wconditional-uninitialized, -Wswitch-enum, -Wunused-macros,
- # -Wmissing-field-initializers, -Wmissing-variable-declarations,
- # -Wincompatible-pointer-types-discards-qualifiers, -Wcast-align,
- # -Wunreachable-code -Wunused-parameter -Wlanguage-extension-token
- # -Wextended-offsetof
- cflags => "-m64 -DL_ENDIAN -Wall -Wextra $clang_disabled_warnings -Qunused-arguments",
+ cflags => "-m64 -DL_ENDIAN -Wall -Wextra -Qunused-arguments",
},
"linux-x32" => {
inherit_from => [ "linux-generic32", asm("x86_64_asm") ],
diff --git a/Configure b/Configure
index 53ff45d..b9e0f50 100755
--- a/Configure
+++ b/Configure
@@ -112,7 +112,15 @@ 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 -Wtype-limits -Werror -DCRYPTO_MDEBUG_ALL -DCRYPTO_MDEBUG_ABORT -DREF_CHECK -DDEBUG_UNUSED";
-my $clang_disabled_warnings = "-Wno-unused-parameter -Wno-missing-field-initializers -Wno-language-extension-token -Wno-extended-offsetof";
+# These are used in addition to $gcc_devteam_warn when the compiler is clang.
+# TODO(openssl-team): fix problems and investigate if (at least) the
+# following warnings can also be enabled: -Wconditional-uninitialized,
+# -Wswitch-enum, -Wunused-macros, -Wmissing-field-initializers,
+# -Wmissing-variable-declarations,
+# -Wincompatible-pointer-types-discards-qualifiers, -Wcast-align,
+# -Wunreachable-code -Wunused-parameter -Wlanguage-extension-token
+# -Wextended-offsetof
+my $clang_devteam_warn = "-Wno-unused-parameter -Wno-missing-field-initializers -Wno-language-extension-token -Wno-extended-offsetof";
my $strict_warnings = 0;
@@ -1726,12 +1734,21 @@ if ($shlib_version_number =~ /(^[0-9]*)\.([0-9\.]*)/)
if ($strict_warnings)
{
+ my $ecc = $cc;
+ $ecc = "clang" if `$cc --version 2>&1` =~ /clang/;
my $wopt;
- die "ERROR --strict-warnings requires gcc or clang" unless ($cc =~ /gcc$/ or $cc =~ /clang$/);
+ die "ERROR --strict-warnings requires gcc or clang" unless ($ecc =~ /gcc$/ or $ecc =~ /clang$/);
foreach $wopt (split /\s+/, $gcc_devteam_warn)
{
$cflags .= " $wopt" unless ($cflags =~ /$wopt/)
}
+ if ($ecc eq "clang")
+ {
+ foreach $wopt (split /\s+/, $clang_devteam_warn)
+ {
+ $cflags .= " $wopt" unless ($cflags =~ /$wopt/)
+ }
+ }
}
open(IN,"<Makefile.org") || die "unable to read Makefile.org:$!\n";
diff --git a/config b/config
index 944ead2..94534cb 100755
--- a/config
+++ b/config
@@ -518,10 +518,12 @@ case "$GUESSOS" in
ISA64=`(sysctl -n hw.optional.x86_64) 2>/dev/null`
if [ "$ISA64" = "1" -a -z "$KERNEL_BITS" ]; then
echo "WARNING! If you wish to build 64-bit library, then you have to"
- echo " invoke './Configure darwin64-x86_64-cc' *manually*."
+ echo " invoke './Configure darwin64-x86_64-cc $options' *manually*."
if [ "$TEST" = "false" -a -t 1 ]; then
echo " You have about 5 seconds to press Ctrl-C to abort."
- (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
+ # The stty technique used elsewhere doesn't work on
+ # MacOS. At least, right now on this Mac.
+ sleep 5
fi
fi
if [ "$ISA64" = "1" -a "$KERNEL_BITS" = "64" ]; then
diff --git a/ssl/record/rec_layer_s3.c b/ssl/record/rec_layer_s3.c
index b7d43f3..0ed82f7 100644
--- a/ssl/record/rec_layer_s3.c
+++ b/ssl/record/rec_layer_s3.c
@@ -445,10 +445,10 @@ int ssl3_write_bytes(SSL *s, int type, const void *buf_, int len)
unsigned int n, nw;
#if !defined(OPENSSL_NO_MULTIBLOCK) && EVP_CIPH_FLAG_TLS1_1_MULTIBLOCK
unsigned int max_send_fragment;
+ unsigned int u_len = (unsigned int)len;
#endif
SSL3_BUFFER *wb = &s->rlayer.wbuf;
int i;
- unsigned int u_len = (unsigned int)len;
if (len < 0) {
SSLerr(SSL_F_SSL3_WRITE_BYTES, SSL_R_SSL_NEGATIVE_LENGTH);
diff --git a/test/bntest.c b/test/bntest.c
index 7aaefc5..1ce6db1 100644
--- a/test/bntest.c
+++ b/test/bntest.c
@@ -1799,8 +1799,8 @@ int test_probable_prime_coprime(BIO *bp, BN_CTX *ctx)
for (j = 0; j < 5; j++) {
if (BN_mod_word(r, primes[j]) == 0) {
- BIO_printf(bp, "Number generated is not coprime to %ld:\n",
- primes[j]);
+ BIO_printf(bp, "Number generated is not coprime to "
+ BN_DEC_FMT1 ":\n", primes[j]);
BN_print_fp(stdout, r);
BIO_printf(bp, "\n");
goto err;
More information about the openssl-commits
mailing list