Skip to content

Commit

Permalink
ANDROID: sign-file: Fix warning when OPENSSL_NO_ENGINE is set
Browse files Browse the repository at this point in the history
Place drain_openssl_errors() function under the same build constraints
as the code that calls it.

  scripts/sign-file.c:96:13: warning: unused function 'drain_openssl_errors' [-Wunused-function]
  static void drain_openssl_errors(void)
            ^
  1 warning generated.

For some reason this wasn't picked-up on during automated testing.

Fixes: e9d39639a529 ("FROMLIST: sign-file: Use OpenSSL provided define to compile out deprecated APIs")
Signed-off-by: Lee Jones <[email protected]>
Change-Id: I3b337a9deac4ee83cb780792ece8f5f701a01f5f
Git-Repo: https://android.googlesource.com/kernel/common
Git-Commit: fad17703b529eeb423eab346ffb8e8fd16baf745
Signed-off-by: Elliot Berman <[email protected]>
  • Loading branch information
Lee Jones authored and eberman-quic committed Oct 19, 2021
1 parent 925f17c commit 570f70d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/sign-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ static void display_openssl_errors(int l)
}
}

#ifndef OPENSSL_NO_ENGINE
static void drain_openssl_errors(void)
{
const char *file;
Expand All @@ -101,6 +102,7 @@ static void drain_openssl_errors(void)
return;
while (ERR_get_error_line(&file, &line)) {}
}
#endif

#define ERR(cond, fmt, ...) \
do { \
Expand Down

0 comments on commit 570f70d

Please sign in to comment.