From: Arne Schwabe Date: Wed, 9 Jun 2021 06:15:32 +0000 (+0200) Subject: Silence warning about format string in check_ca_required X-Git-Tag: v2.6_beta1~484 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d2e5412aa48e028c07bc7a3a9447593b711a9e0c;p=thirdparty%2Fopenvpn.git Silence warning about format string in check_ca_required 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 Signed-off-by: Antonio Quartulli Acked-by: Selva Nair Message-Id: <20210609061532.12774-1-a@unstable.cc> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22519.html Signed-off-by: Gert Doering --- diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 819979b15..086f7b6e5 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -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