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

@ -7,10 +7,10 @@
* rewrite to work around the paragraph 2 in the BSD licenses as explained
* below.
*
* Copyright (c) 1998, 1999, 2017 Kungliga Tekniska Högskolan
* Copyright (c) 1998, 1999 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
*
* Copyright (C) 2001 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 2001 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* All rights reserved.
*
@ -529,7 +529,7 @@ static CURLcode choose_mech(struct connectdata *conn)
if(ret != AUTH_CONTINUE) {
if(ret != AUTH_OK) {
/* Mechanism has dumped the error to stderr, don't error here. */
return -1;
return CURLE_USE_SSL_FAILED;
}
DEBUGASSERT(ret == AUTH_OK);