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>
make-http-max-header-size-gyp-configurable
Alexis La Goutte 10 years ago committed by Fedor Indutny
parent 0b43367131
commit 5fd51fd59d

@ -2207,7 +2207,6 @@ print_error (const char *raw, size_t error_location)
break; break;
case '\n': case '\n':
char_len = 2;
fprintf(stderr, "\\n\n"); fprintf(stderr, "\\n\n");
if (this_line) goto print; if (this_line) goto print;
@ -2910,15 +2909,11 @@ test_simple (const char *buf, enum http_errno err_expected)
{ {
parser_init(HTTP_REQUEST); parser_init(HTTP_REQUEST);
size_t parsed;
int pass;
enum http_errno err; enum http_errno err;
parsed = parse(buf, strlen(buf)); parse(buf, strlen(buf));
pass = (parsed == strlen(buf));
err = HTTP_PARSER_ERRNO(parser); err = HTTP_PARSER_ERRNO(parser);
parsed = parse(NULL, 0); parse(NULL, 0);
pass &= (parsed == 0);
parser_free(); parser_free();

Loading…
Cancel
Save