Skip to content
Snippets Groups Projects
Commit 6f0dd6c5 authored by Philippe Mathieu-Daudé's avatar Philippe Mathieu-Daudé Committed by Laurent Vivier
Browse files

json: Move switch 'fall through' comment to correct place


Reported by GCC9 when building with CFLAG -Wimplicit-fallthrough=2:

  qobject/json-parser.c: In function ‘parse_literal’:
  qobject/json-parser.c:492:24: error: this statement may fall through [-Werror=implicit-fallthrough=]
    492 |     case JSON_INTEGER: {
        |                        ^
  qobject/json-parser.c:524:5: note: here
    524 |     case JSON_FLOAT:
        |     ^~~~

Correctly place the 'fall through' comment.

Reported-by: default avatarStefan Weil <sw@weilnetz.de>
Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: default avatarEric Blake <eblake@redhat.com>
Message-Id: <20190719131425.10835-2-philmd@redhat.com>
Signed-off-by: default avatarLaurent Vivier <laurent@vivier.eu>
parent 80867bdb
No related branches found
No related tags found
No related merge requests found
......@@ -519,8 +519,8 @@ static QObject *parse_literal(JSONParserContext *ctxt)
}
assert(ret == -ERANGE);
}
/* fall through to JSON_FLOAT */
}
/* fall through to JSON_FLOAT */
case JSON_FLOAT:
/* FIXME dependent on locale; a pervasive issue in QEMU */
/* FIXME our lexer matches RFC 8259 in forbidding Inf or NaN,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment