]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Silence warning about format string in check_ca_required
authorArne Schwabe <arne@rfc2549.org>
Wed, 9 Jun 2021 06:15:32 +0000 (08:15 +0200)
committerGert Doering <gert@greenie.muc.de>
Sun, 13 Jun 2021 18:26:11 +0000 (20:26 +0200)
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 <arne@rfc2549.org>
Signed-off-by: Antonio Quartulli <a@unstable.cc>
Acked-by: Selva Nair <selva.nair@gmail.com>
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 <gert@greenie.muc.de>
src/openvpn/options.c

index 819979b159804059cb4e9d6f99d132b2841b57c8..086f7b6e5f62a89d594861a0ae24e42edd710d8c 100644 (file)
@@ -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