Skip to content

Commit 85695f3

Browse files
authored
Merge pull request #162 from ghane/Case-Warning
Add default case for a switch statement to avoid complaints from the compiler.
2 parents fdcef3e + cdcfaaf commit 85695f3

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

jsmn.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ static int jsmn_parse_primitive(jsmn_parser *parser, const char *js,
154154
case ']':
155155
case '}':
156156
goto found;
157+
default:
158+
/* to quiet a warning from gcc*/
159+
break;
157160
}
158161
if (js[parser->pos] < 32 || js[parser->pos] >= 127) {
159162
parser->pos = start;

0 commit comments

Comments
 (0)