Skip to content

Commit

Permalink
Fix unused variable in http_parser_test
Browse files Browse the repository at this point in the history
Reviewed By: jbeshay

Differential Revision: D50326921

fbshipit-source-id: 22b5dd1626d1b3d85ac137550ee34a67a32514d9
  • Loading branch information
Luca Niccolini authored and facebook-github-bot committed Oct 16, 2023
1 parent 89a0872 commit 7a73cf1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions proxygen/external/http_parser/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -2507,8 +2507,10 @@ test_simple (const char *buf, enum http_errno err_expected)
*/
#if HTTP_PARSER_STRICT_URL || HTTP_PARSER_STRICT_HOSTNAME
if (err_expected != err && err_expected != HPE_OK && err != HPE_STRICT) {
assert(pass != 0);
#else
if (err_expected != err) {
assert(pass == 0);
#endif
fprintf(stderr, "\n*** test_simple expected %s, but saw %s ***\n\n%s\n",
http_errno_name(err_expected), http_errno_name(err), buf);
Expand Down Expand Up @@ -2540,6 +2542,7 @@ test_lax_in_strict_mode (const char *buf, enum http_errno err_expected)
* long as the caller isn't expecting success.
*/
if (err_expected != err && err_expected != HPE_OK && err != HPE_STRICT) {
assert(pass != 0);
fprintf(stderr, "\n*** test_simple expected %s, but saw %s ***\n\n%s\n",
http_errno_name(err_expected), http_errno_name(err), buf);
exit(1);
Expand Down

0 comments on commit 7a73cf1

Please sign in to comment.