Commit e22289e9 authored by Rusty Russell's avatar Rusty Russell

ccan_tokenizer: remove warnings with gcc

/home/rusty/devel/cvs/ccan/ccan/ccan_tokenizer/test/run.c:898:66: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
 #define T(txt, ...) {txt, sizeof(txt)-1, array_count_pair(struct token, __VA_ARGS__)}
...
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 806f94eb
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment