mirror of
https://github.com/curl/curl.git
synced 2026-08-24 20:13:35 +03:00
tidy-up: delete, comment or scope C macros reported unused
To reduce the number `-Wunused-macro` compiler warnings: - delete unused macros. - comment out unused macro that are part of a set. - move macros into the scope they are used. This may be useful to enable by default, but there are tricky cases that I didn't manage to fix and paused the effort. E.g. internal features checks in `openssl.c`. There is more, once those are fixed. Closes #16279
This commit is contained in:
parent
edd013326d
commit
784a8ec2c1
36 changed files with 86 additions and 131 deletions
|
|
@ -185,12 +185,12 @@ static const struct NameValue setopt_nv_CURLNONZERODEFAULTS[] = {
|
|||
} \
|
||||
} while(0)
|
||||
|
||||
#define DECL0(s) ADD((&easysrc_decl, s))
|
||||
/* #define DECL0(s) ADD((&easysrc_decl, s)) */
|
||||
#define DECL1(f,a) ADDF((&easysrc_decl, f,a))
|
||||
|
||||
#define DATA0(s) ADD((&easysrc_data, s))
|
||||
/* #define DATA0(s) ADD((&easysrc_data, s)) */
|
||||
#define DATA1(f,a) ADDF((&easysrc_data, f,a))
|
||||
#define DATA2(f,a,b) ADDF((&easysrc_data, f,a,b))
|
||||
/* #define DATA2(f,a,b) ADDF((&easysrc_data, f,a,b)) */
|
||||
#define DATA3(f,a,b,c) ADDF((&easysrc_data, f,a,b,c))
|
||||
|
||||
#define CODE0(s) ADD((&easysrc_code, s))
|
||||
|
|
@ -198,11 +198,11 @@ static const struct NameValue setopt_nv_CURLNONZERODEFAULTS[] = {
|
|||
#define CODE2(f,a,b) ADDF((&easysrc_code, f,a,b))
|
||||
#define CODE3(f,a,b,c) ADDF((&easysrc_code, f,a,b,c))
|
||||
|
||||
#define CLEAN0(s) ADD((&easysrc_clean, s))
|
||||
/* #define CLEAN0(s) ADD((&easysrc_clean, s)) */
|
||||
#define CLEAN1(f,a) ADDF((&easysrc_clean, f,a))
|
||||
|
||||
#define REM0(s) ADD((&easysrc_toohard, s))
|
||||
#define REM1(f,a) ADDF((&easysrc_toohard, f,a))
|
||||
/* #define REM0(s) ADD((&easysrc_toohard, s)) */
|
||||
/* #define REM1(f,a) ADDF((&easysrc_toohard, f,a)) */
|
||||
#define REM3(f,a,b,c) ADDF((&easysrc_toohard, f,a,b,c))
|
||||
|
||||
/* Escape string to C string syntax. Return NULL if out of memory.
|
||||
|
|
@ -715,6 +715,4 @@ nomem:
|
|||
return ret;
|
||||
}
|
||||
|
||||
#else /* CURL_DISABLE_LIBCURL_OPTION */
|
||||
|
||||
#endif /* CURL_DISABLE_LIBCURL_OPTION */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue