mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
daemon/json, test/test_protocol: avoid gcc -O warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
e109977df7
commit
a44e4fb631
@ -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)
|
||||
|
@ -998,7 +998,9 @@ static void do_cmd(struct peer *peer)
|
||||
} else
|
||||
errx(1, "%s: Unknown command %s", peer->name, cmd);
|
||||
|
||||
write(peer->cmddonefd, peer->info, strlen(peer->info)+1);
|
||||
if (write(peer->cmddonefd, peer->info, strlen(peer->info)+1)
|
||||
!= strlen(peer->info)+1)
|
||||
abort();
|
||||
|
||||
/* We must always have (at least one) signed, unrevoked commit. */
|
||||
for (ci = peer->local; ci; ci = ci->prev) {
|
||||
|
Loading…
Reference in New Issue
Block a user