Skip to content

Commit

Permalink
Silence warning about format string in check_ca_required
Browse files Browse the repository at this point in the history
clang does not like if the format argument of printf like function
is not a string literal (or constant):

warning: format string is not a string literal (potentially insecure)

Make the format string constant to silence the warning.

Signed-off-by: Arne Schwabe <[email protected]>
Signed-off-by: Antonio Quartulli <[email protected]>
Acked-by: Selva Nair <[email protected]>
Message-Id: <[email protected]>
URL: https://www.mail-archive.com/[email protected]/msg22519.html
Signed-off-by: Gert Doering <[email protected]>
  • Loading branch information
schwabe authored and cron2 committed Jun 13, 2021
1 parent b4f658d commit d2e5412
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/openvpn/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -2069,7 +2069,7 @@ check_ca_required(const struct options *options)
return;
}

const char* str = "You must define CA file (--ca)"
const char* const str = "You must define CA file (--ca)"
#ifndef ENABLE_CRYPTO_MBEDTLS
" or CA path (--capath)"
#endif
Expand Down

0 comments on commit d2e5412

Please sign in to comment.