Commit 6e86fffc authored by Rusty Russell's avatar Rusty Russell

foreach: fixed maybe uninitialized warning in test (-O2)

/home/rusty/devel/cvs/ccan/ccan/tap/tap.h:57:59: warning: ‘max_iters’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    _gen_result(1, __func__, __FILE__, __LINE__, "%s", #e) : \
                                                           ^
/home/rusty/devel/cvs/ccan/ccan/foreach/test/run-nested.c:47:17: note: ‘max_iters’ was declared here
  int i, j, sum, max_iters;
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 1de20460
......@@ -44,7 +44,7 @@ static int count_iters(void)
int main(void)
{
int i, j, sum, max_iters;
int i, j, sum, max_iters = 0 /* keep gcc happy */;
const char *istr, *jstr;
plan_tests(13);
......
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