Commit e589d16b authored by Rusty Russell's avatar Rusty Russell

cdump: fix uninitialized warning with optimization

/home/rusty/devel/cvs/ccan/ccan/cdump/cdump.c: In function ‘get_type’:
/home/rusty/devel/cvs/ccan/ccan/strmap/strmap.h:88:39: warning: ‘m’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  tcon_cast((map), canary, strmap_get_(&(map)->raw, (member)))
                                       ^
/home/rusty/devel/cvs/ccan/ccan/cdump/cdump.c:216:20: note: ‘m’ was declared here
  cdump_map_t *m;
               ^
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 280c917d
......@@ -213,7 +213,7 @@ static struct cdump_type *get_type(struct cdump_definitions *defs,
enum cdump_type_kind kind,
const char *name)
{
cdump_map_t *m;
cdump_map_t *m = (void *)0x1L; /* Shouldn't be used */
struct cdump_type *t;
switch (kind) {
......
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