From e9a5e8cc55286941503f36c5b7485a5aa923b3f1 Mon Sep 17 00:00:00 2001 From: David Howells Date: Thu, 13 Aug 2015 04:03:12 +0100 Subject: [PATCH] sign-file: Fix warning about BIO_reset() return value MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fix the following warning: scripts/sign-file.c: In function ‘main’: scripts/sign-file.c:188: warning: value computed is not used whereby the result of BIO_ctrl() is cast inside of BIO_reset() to an integer of a different size - which we're not checking but probably should. Reported-by: James Morris Signed-off-by: David Howells --- scripts/sign-file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/sign-file.c b/scripts/sign-file.c index e9741e8..058bba3 100755 --- a/scripts/sign-file.c +++ b/scripts/sign-file.c @@ -185,7 +185,7 @@ int main(int argc, char **argv) ERR(!b, "%s", x509_name); x509 = d2i_X509_bio(b, NULL); /* Binary encoded X.509 */ if (!x509) { - BIO_reset(b); + ERR(BIO_reset(b) != 1, "%s", x509_name); x509 = PEM_read_bio_X509(b, NULL, NULL, NULL); /* PEM encoded X.509 */ if (x509) drain_openssl_errors(); -- 2.7.4