mirror of
https://github.com/curl/curl.git
synced 2026-08-25 00:43:34 +03:00
GHA: enable -Wunused-macros in clang-tidy jobs
Also fix fallouts found. Windows clang-tidy CI job is a little pickier than I'd prefer due to the `_CURL_TESTS_CONCAT=ON` option used there, and all macros considered local, thus checked by the compiler. Upside: it revealed macro usage dynamics in tests. If too annoying, `first.h` may be opted-out from the concat logic. Some macros may also be deleted instead of `#if 0`-ing. Follow-up toe0e56e9ae4#21550 Follow-up to5fa5cb3825#20593 Closes #21554
This commit is contained in:
parent
a15483c4ca
commit
47f411c6d8
16 changed files with 66 additions and 33 deletions
|
|
@ -43,8 +43,10 @@
|
|||
|
||||
#define MAC_DIFFER 0x40
|
||||
#define MAC_SHIFT 16
|
||||
#if 0
|
||||
#define MAC_MATCH ((CURL_FNMATCH_MATCH << MAC_SHIFT) | MAC_DIFFER)
|
||||
#define MAC_NOMATCH ((CURL_FNMATCH_NOMATCH << MAC_SHIFT) | MAC_DIFFER)
|
||||
#endif
|
||||
#define MAC_FAIL ((CURL_FNMATCH_FAIL << MAC_SHIFT) | MAC_DIFFER)
|
||||
|
||||
static const char *ret2name(int i)
|
||||
|
|
|
|||
|
|
@ -190,8 +190,6 @@ static CURLcode test_unit1666(const char *arg)
|
|||
UNITTEST_END_SIMPLE
|
||||
}
|
||||
|
||||
#undef OID
|
||||
|
||||
#else
|
||||
|
||||
static CURLcode test_unit1666(const char *arg)
|
||||
|
|
|
|||
|
|
@ -37,9 +37,6 @@ struct test_1667 {
|
|||
CURLcode result_exp;
|
||||
};
|
||||
|
||||
/* the size of the object needs to deduct the null terminator */
|
||||
#define OID(x) x, sizeof(x) - 1
|
||||
|
||||
static bool test1667(const struct test_1667 *spec, size_t i,
|
||||
struct dynbuf *dbuf)
|
||||
{
|
||||
|
|
@ -326,8 +323,6 @@ static CURLcode test_unit1667(const char *arg)
|
|||
UNITTEST_END_SIMPLE
|
||||
}
|
||||
|
||||
#undef OID
|
||||
|
||||
#else
|
||||
|
||||
static CURLcode test_unit1667(const char *arg)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue