lib: fix -Wassign-enum warnings

configure --enable-debug now enables -Wassign-enum with clang,
identifying several enum "abuses" also fixed.

Reported-by: Gisle Vanem
Bug: 879007f811 (commitcomment-42087553)

Closes #5929
This commit is contained in:
Daniel Stenberg 2020-09-07 10:52:48 +02:00
parent ad425d3e3e
commit 17fcdf6a31
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
15 changed files with 53 additions and 48 deletions

View file

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@ -47,7 +47,7 @@ int main(int argc, char **argv)
const curl_ssl_backend **list;
int i;
result = curl_global_sslset(-1, NULL, &list);
result = curl_global_sslset((curl_sslbackend)-1, NULL, &list);
assert(result == CURLSSLSET_UNKNOWN_BACKEND);
for(i = 0; list[i]; i++)
@ -62,7 +62,7 @@ int main(int argc, char **argv)
result = curl_global_sslset((curl_sslbackend)id, NULL, NULL);
}
else
result = curl_global_sslset(-1, name, NULL);
result = curl_global_sslset((curl_sslbackend)-1, name, NULL);
if(result == CURLSSLSET_UNKNOWN_BACKEND) {
fprintf(stderr, "Unknown SSL backend id: %s\n", name);