Skip to content

Commit 281a624

Browse files
Remove redundant lower-bound assert for parsing state (#205)
Some toolchains (e.g. IAR with warnings-as-errors) treat the enum range as constrained, so parsingState >= HTTP_PARSING_NONE (0) is always true and triggers a diagnostic. Signed-off-by: Tomas Galbicka <tomas.galbicka@nxp.com>
1 parent 3c4a583 commit 281a624

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

source/core_http_client.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1994,8 +1994,7 @@ static HTTPStatus_t getFinalResponseStatus( HTTPParsingState_t parsingState,
19941994
{
19951995
HTTPStatus_t returnStatus = HTTPSuccess;
19961996

1997-
assert( parsingState >= HTTP_PARSING_NONE &&
1998-
parsingState <= HTTP_PARSING_COMPLETE );
1997+
assert( parsingState <= HTTP_PARSING_COMPLETE );
19991998
assert( totalReceived <= pResponse->bufferLen );
20001999

20012000
/* If no parsing occurred, that means network data was never received. */

0 commit comments

Comments
 (0)