From b9e0ccc6504fe4a8fc8780c948833f1dfa1ebf16 Mon Sep 17 00:00:00 2001 From: Adam Langley Date: Tue, 16 Dec 2014 16:11:35 -0800 Subject: [PATCH] Fix a couple of minor compiler warnings. One about a possible uninitialised variable (incorrect, but it's easier to keep the compiler happy) and one warning about "const static" being backwards. Change-Id: Ic5976a5f0b48f32e09682e31b65d8ea1c27e5b88 Reviewed-on: https://boringssl-review.googlesource.com/2632 Reviewed-by: David Benjamin Reviewed-by: Adam Langley --- crypto/x509/x509_vfy.c | 2 +- crypto/x509v3/v3_utl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c index 030d3ce2..99d55bc8 100644 --- a/crypto/x509/x509_vfy.c +++ b/crypto/x509/x509_vfy.c @@ -1900,7 +1900,7 @@ ASN1_TIME *X509_time_adj(ASN1_TIME *s, long offset_sec, time_t *in_tm) ASN1_TIME *X509_time_adj_ex(ASN1_TIME *s, int offset_day, long offset_sec, time_t *in_tm) { - time_t t; + time_t t = 0; if (in_tm) t = *in_tm; else time(&t); diff --git a/crypto/x509v3/v3_utl.c b/crypto/x509v3/v3_utl.c index 4cd0c0ca..b856efd9 100644 --- a/crypto/x509v3/v3_utl.c +++ b/crypto/x509v3/v3_utl.c @@ -370,7 +370,7 @@ char *hex_to_string(const unsigned char *buffer, long len) char *tmp, *q; const unsigned char *p; int i; - const static char hexdig[] = "0123456789ABCDEF"; + static const char hexdig[] = "0123456789ABCDEF"; if(!buffer || !len) return NULL; if(!(tmp = OPENSSL_malloc(len * 3 + 1))) { OPENSSL_PUT_ERROR(X509V3, hex_to_string, ERR_R_MALLOC_FAILURE);