checksrc: check for assert, replace in tests where missing, drop from examples

Follow-up to 791b6883ed #22521

Closes #22527
This commit is contained in:
Viktor Szakats 2026-08-10 08:02:37 +02:00
parent 5050196dcc
commit 5ef4e1cabc
No known key found for this signature in database
9 changed files with 44 additions and 39 deletions

View file

@ -49,8 +49,7 @@ int main(int argc, const char **argv)
const curl_ssl_backend **list;
int i;
result = curl_global_sslset(CURLSSLBACKEND_NONE, NULL, &list);
assert(result == CURLSSLSET_UNKNOWN_BACKEND);
(void)curl_global_sslset(CURLSSLBACKEND_NONE, NULL, &list);
for(i = 0; list[i]; i++)
printf("SSL backend #%d: '%s' (ID: %d)\n",
@ -71,8 +70,6 @@ int main(int argc, const char **argv)
return 1;
}
assert(result == CURLSSLSET_OK);
printf("Version with SSL backend '%s':\n\n\t%s\n", name, curl_version());
return 0;

View file

@ -353,6 +353,7 @@ This is the full list of functions generally banned.
accept4
access
aprintf
assert
atoi
atol
calloc