From: Patrick Monnerat Date: Sat, 17 Sep 2022 12:09:07 +0000 (+0200) Subject: lib1597: make it C89-compliant again X-Git-Tag: curl-7_86_0~212 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7ca36f4956f7209817f5e56aee187feb7ca33539;p=thirdparty%2Fcurl.git lib1597: make it C89-compliant again Automatic variable addresses cannot be used in an initialisation aggregate. Follow-up to 9d51329 Reported-by: Daniel Stenberg Fixes: #9524 Closes #9525 --- diff --git a/tests/libtest/lib1597.c b/tests/libtest/lib1597.c index cb167e84fa..cf2effaa19 100644 --- a/tests/libtest/lib1597.c +++ b/tests/libtest/lib1597.c @@ -38,18 +38,18 @@ int test(char *URL) CURL *curl = NULL; int res = 0; CURLcode result = CURLE_OK; - CURLcode ok = CURLE_OK; - CURLcode bad = CURLE_BAD_FUNCTION_ARGUMENT; - CURLcode unsup = CURLE_UNSUPPORTED_PROTOCOL; - CURLcode httpcode = CURLE_UNSUPPORTED_PROTOCOL; - CURLcode httpscode = CURLE_UNSUPPORTED_PROTOCOL; curl_version_info_data *curlinfo; const char *const *proto; - char protolist[1024]; int n; int i; + static CURLcode ok = CURLE_OK; + static CURLcode bad = CURLE_BAD_FUNCTION_ARGUMENT; + static CURLcode unsup = CURLE_UNSUPPORTED_PROTOCOL; + static CURLcode httpcode = CURLE_UNSUPPORTED_PROTOCOL; + static CURLcode httpscode = CURLE_UNSUPPORTED_PROTOCOL; + static char protolist[1024]; - struct pair prots[] = { + static const struct pair prots[] = { {"goobar", &unsup}, {"http ", &unsup}, {" http", &unsup},