silence globally

This commit is contained in:
Viktor Szakats 2026-03-07 16:44:48 +01:00
parent bd09df3081
commit b3614254ae
No known key found for this signature in database
5 changed files with 13 additions and 5 deletions

View file

@ -516,6 +516,7 @@ typedef int (*curl_prereq_callback)(void *clientp,
*/
typedef enum {
CURLE_SIGNED = -1, /* to ensure signed type, never use! */
CURLE_OK = 0,
CURLE_UNSUPPORTED_PROTOCOL, /* 1 */
CURLE_FAILED_INIT, /* 2 */
@ -2605,7 +2606,8 @@ struct curl_forms {
*
***************************************************************************/
typedef enum {
CURL_FORMADD_OK CURL_DEPRECATED(7.56.0, ""), /* 1st, no error */
CURL_FORMADD_SIGNED = -1, /* to ensure signed type, never use! */
CURL_FORMADD_OK CURL_DEPRECATED(7.56.0, "") = 0, /* 1st, no error */
CURL_FORMADD_MEMORY CURL_DEPRECATED(7.56.0, ""),
CURL_FORMADD_OPTION_TWICE CURL_DEPRECATED(7.56.0, ""),
@ -3055,7 +3057,8 @@ typedef void (*curl_unlock_function)(CURL *handle,
void *userptr);
typedef enum {
CURLSHE_OK, /* all is fine */
CURLSHE_SIGNED = -1, /* to ensure signed type, never use! */
CURLSHE_OK = 0, /* all is fine */
CURLSHE_BAD_OPTION, /* 1 */
CURLSHE_IN_USE, /* 2 */
CURLSHE_INVALID, /* 3 */

View file

@ -32,7 +32,8 @@ extern "C" {
/* the error codes for the URL API */
typedef enum {
CURLUE_OK,
CURLUE_SIGNED = -1, /* to ensure signed type, never use! */
CURLUE_OK = 0,
CURLUE_BAD_HANDLE, /* 1 */
CURLUE_BAD_PARTPOINTER, /* 2 */
CURLUE_MALFORMED_INPUT, /* 3 */

View file

@ -404,6 +404,7 @@ const char *curl_share_strerror(CURLSHcode error)
case CURLSHE_NOT_BUILT_IN:
return "Feature not enabled in this library";
case CURLSHE_SIGNED:
case CURLSHE_LAST:
break;
}
@ -517,6 +518,7 @@ const char *curl_url_strerror(CURLUcode error)
case CURLUE_TOO_LARGE:
return "A value or data field is larger than allowed";
case CURLUE_SIGNED:
case CURLUE_LAST:
break;
}

View file

@ -179,8 +179,10 @@ for my $e (sort @syms) {
# *_LAST and *_LASTENTRY are just suffix for the placeholders used for the
# last entry in many enum series.
#
# *_SIGNED is a suffix to make enums a signed type.
#
if($e =~ /(OBSOLETE|CURLE_RESERVED|^CURL_EXTERN|^CURLINC_|_LAST\z|_LASTENTRY\z|^CURL_TEMP_)/) {
if($e =~ /(OBSOLETE|CURLE_RESERVED|^CURL_EXTERN|^CURLINC_|_LAST\z|_LASTENTRY\z|_SIGNED\z|^CURL_TEMP_)/) {
$ignored++;
next;
}

View file

@ -49,7 +49,7 @@ sub scanheader {
$line++;
if($_ =~ /^ (CURL(E|UE|SHE|HE|M)_[A-Z0-9_]*)/) {
my ($name)=($1);
if(($name !~ /(OBSOLETE|CURLE_RESERVED)/) && ($name !~ /_LAST\z/)) {
if(($name !~ /(OBSOLETE|CURLE_RESERVED)/) && ($name !~ /(_LAST|_SIGNED)\z/)) {
push @hnames, $name;
if($wherefrom{$name}) {
print STDERR "double: $name\n";