mirror of
https://github.com/nodejs/http-parser.git
synced 2025-10-18 18:27:24 +08:00
Fix warning on test suite found by Clang Analyzer
test.c:2210:9: warning: Value stored to 'char_len' is never read char_len = 2; ^ ~ test.c:2921:3: warning: Value stored to 'pass' is never read pass &= (parsed == 0); ^ ~~~~~~~~~~~~~ Reviewed-By: Fedor Indutny <fedor@indutny.com>
This commit is contained in:

committed by
Fedor Indutny

parent
0b43367131
commit
5fd51fd59d
9
test.c
9
test.c
@@ -2207,7 +2207,6 @@ print_error (const char *raw, size_t error_location)
|
||||
break;
|
||||
|
||||
case '\n':
|
||||
char_len = 2;
|
||||
fprintf(stderr, "\\n\n");
|
||||
|
||||
if (this_line) goto print;
|
||||
@@ -2910,15 +2909,11 @@ test_simple (const char *buf, enum http_errno err_expected)
|
||||
{
|
||||
parser_init(HTTP_REQUEST);
|
||||
|
||||
size_t parsed;
|
||||
int pass;
|
||||
enum http_errno err;
|
||||
|
||||
parsed = parse(buf, strlen(buf));
|
||||
pass = (parsed == strlen(buf));
|
||||
parse(buf, strlen(buf));
|
||||
err = HTTP_PARSER_ERRNO(parser);
|
||||
parsed = parse(NULL, 0);
|
||||
pass &= (parsed == 0);
|
||||
parse(NULL, 0);
|
||||
|
||||
parser_free();
|
||||
|
||||
|
Reference in New Issue
Block a user