X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;ds=sidebyside;f=ccan%2Fccan_tokenizer%2Ftest%2Frun.c;h=6d23a83eab7e19beb3e9891378dcc3fb383925e8;hb=HEAD;hp=92fe43c68a67d818bd64133bf681f9af11f66407;hpb=af052b1a93f91b6e0888d5ece29786243d57cf2e;p=ccan diff --git a/ccan/ccan_tokenizer/test/run.c b/ccan/ccan_tokenizer/test/run.c index 92fe43c6..6d23a83e 100644 --- a/ccan/ccan_tokenizer/test/run.c +++ b/ccan/ccan_tokenizer/test/run.c @@ -896,14 +896,14 @@ struct tokenizer_test { }; #define T(txt, ...) {txt, sizeof(txt)-1, array_count_pair(struct token, __VA_ARGS__)} -#define string(txt) {.string=(darray_char[1]){{.item = (txt), .size = sizeof(txt)-1}}} +#define string(txt) {.string=(darray_char[1]){{.item = (char *)(txt), .size = sizeof(txt)-1}}} #define opkw(v) {.opkw = (v)} #define txt(t) .txt = (t), .txt_size = sizeof(t)-1 #define integer(...) {.integer={__VA_ARGS__}} #define floating(...) {.floating={__VA_ARGS__}} #define space {.type = TOK_WHITE, .txt = " ", .txt_size = 1} #define startline {.type = TOK_STARTLINE} -#define include(str) {.include = (str)} +#define include(str) {.include = (char *)(str)} struct tokenizer_msg_test { struct tokenizer_test test; @@ -915,7 +915,7 @@ struct tokenizer_msg_test { #define M(...) array_count_pair(const char *, __VA_ARGS__) struct tokenizer_test tokenizer_tests[] = { - T(""), + { "", 0, 0 }, T("\n", {.type = TOK_WHITE, txt("\n")} ),