Skip to content

Commit

Permalink
Merge pull request appneta#463 from appneta/Bug_#412_libopts_compile_…
Browse files Browse the repository at this point in the history
…warning

appneta#412 fix gcc 6.3 compiler warning
  • Loading branch information
fklassen authored Jan 26, 2018
2 parents f1d652c + cb17743 commit b663095
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions libopts/nested.c
Original file line number Diff line number Diff line change
Expand Up @@ -783,12 +783,23 @@ optionLoadNested(char const * text, char const * name, size_t nm_len)
text = scan_name(text, res_val);

else switch (*text) {
case NUL: goto scan_done;
case '<': text = scan_xml(text, res_val);
if (text == NULL) goto woops;
if (*text == ',') text++; break;
case '#': text = strchr(text, NL); break;
default: goto woops;
case NUL:
goto scan_done;

case '<':
text = scan_xml(text, res_val);
if (text == NULL)
goto woops;
if (text[0] == ',')
text++;
break;

case '#':
text = strchr(text, NL);
break;

default:
goto woops;
}
} while (text != NULL); scan_done:;

Expand Down

0 comments on commit b663095

Please sign in to comment.