Skip to content

Commit e9a5e8c

Browse files
committed
sign-file: Fix warning about BIO_reset() return value
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 <[email protected]> Signed-off-by: David Howells <[email protected]>
1 parent 772111a commit e9a5e8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/sign-file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ int main(int argc, char **argv)
185185
ERR(!b, "%s", x509_name);
186186
x509 = d2i_X509_bio(b, NULL); /* Binary encoded X.509 */
187187
if (!x509) {
188-
BIO_reset(b);
188+
ERR(BIO_reset(b) != 1, "%s", x509_name);
189189
x509 = PEM_read_bio_X509(b, NULL, NULL, NULL); /* PEM encoded X.509 */
190190
if (x509)
191191
drain_openssl_errors();

0 commit comments

Comments
 (0)