ccan_tokenizer: don't assume __VA_ARGS__ can be empty.
authorRusty Russell <rusty@rustcorp.com.au>
Thu, 29 Mar 2012 04:28:23 +0000 (14:58 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 29 Mar 2012 04:28:23 +0000 (14:58 +1030)
That's a gcc extension.

ccan/ccan_tokenizer/test/run.c

index 92fe43c68a67d818bd64133bf681f9af11f66407..d3f0432939f9f59a22e6c76af776d1bf59b84862 100644 (file)
@@ -915,7 +915,7 @@ struct tokenizer_msg_test {
 #define M(...) array_count_pair(const char *, __VA_ARGS__)
 
 struct tokenizer_test tokenizer_tests[] = {
 #define M(...) array_count_pair(const char *, __VA_ARGS__)
 
 struct tokenizer_test tokenizer_tests[] = {
-       T(""),
+       { "", 0, 0 },
        T("\n",
                {.type = TOK_WHITE, txt("\n")}
        ),
        T("\n",
                {.type = TOK_WHITE, txt("\n")}
        ),