Skip to content

Commit cb17743

Browse files
committed
appneta#412 fix gcc 6.3 compiler warning
1 parent 1105ec0 commit cb17743

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

libopts/nested.c

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -783,12 +783,23 @@ optionLoadNested(char const * text, char const * name, size_t nm_len)
783783
text = scan_name(text, res_val);
784784

785785
else switch (*text) {
786-
case NUL: goto scan_done;
787-
case '<': text = scan_xml(text, res_val);
788-
if (text == NULL) goto woops;
789-
if (*text == ',') text++; break;
790-
case '#': text = strchr(text, NL); break;
791-
default: goto woops;
786+
case NUL:
787+
goto scan_done;
788+
789+
case '<':
790+
text = scan_xml(text, res_val);
791+
if (text == NULL)
792+
goto woops;
793+
if (text[0] == ',')
794+
text++;
795+
break;
796+
797+
case '#':
798+
text = strchr(text, NL);
799+
break;
800+
801+
default:
802+
goto woops;
792803
}
793804
} while (text != NULL); scan_done:;
794805

0 commit comments

Comments
 (0)