From 79b1cb226777783a06de481b703b47abff861bef Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 30 Oct 2022 08:54:16 +0000 Subject: [PATCH] testcrypt: remove some pointless macros. I just happened to notice ARG1 and ARGN in the code that builds the dispatch table in process_line(), which aren't used at all, because they date from a previous version of the testcrypt-func.h macro system. They were supposed to be replaced everywhere with the unified ARG. So why didn't the missing definition of ARG break anything? Because ARG only ever appears in the variadic part of a FUNC_INNER call - and for this particular trawl of testcrypt-func.h, the variadic part isn't ever used in the macro expansion in the first place. So there's no need to define ARG and VOID to anything at all, not even the empty string. --- test/testcrypt.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/test/testcrypt.c b/test/testcrypt.c index 3755ae72..54941cb2 100644 --- a/test/testcrypt.c +++ b/test/testcrypt.c @@ -1613,13 +1613,8 @@ static void process_line(BinarySource *in, strbuf *out) #define FUNC_INNER(outtype, fname, realname, ...) \ DISPATCH_INTERNAL(#fname,handle_##fname); -#define ARG1(type, arg) -#define ARGN(type, arg) -#define VOID #include "testcrypt-func.h" #undef FUNC_INNER -#undef ARG -#undef VOID #undef DISPATCH_INTERNAL