daemon/json, test/test_protocol: avoid gcc -O warnings.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-12-15 11:49:13 +10:30
parent e109977df7
commit a44e4fb631
2 changed files with 5 additions and 2 deletions

View File

@@ -226,7 +226,8 @@ bool json_get_params(const char *buffer, const jsmntok_t param[], ...)
{
va_list ap;
const char *name;
const jsmntok_t **tokptr, *p, *end;
/* Uninitialized warnings on p and end */
const jsmntok_t **tokptr, *p = NULL, *end = NULL;
if (param->type == JSMN_ARRAY) {
if (param->size == 0)