summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Barnes <craigbarnes85@gmail.com>2013-05-04 00:20:16 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2013-05-04 10:44:50 +0100
commitd509919a3bc507f3898e2166978462badbaab599 (patch)
tree2354e485ffe7881b15a3b5fa30e909e4cc6edf82
parentff31fd617c976832422206a9d36ecd395f45cbaf (diff)
downloadlibhubbub-d509919a3bc507f3898e2166978462badbaab599.tar.gz
libhubbub-d509919a3bc507f3898e2166978462badbaab599.tar.bz2
Correct various warnings in the test suite
-rw-r--r--test/csdetect.c2
-rw-r--r--test/parser.c4
-rw-r--r--test/tokeniser.c6
-rw-r--r--test/tokeniser2.c6
-rw-r--r--test/tokeniser3.c6
-rw-r--r--test/tree.c4
6 files changed, 14 insertions, 14 deletions
diff --git a/test/csdetect.c b/test/csdetect.c
index 3f24792..aa1b192 100644
--- a/test/csdetect.c
+++ b/test/csdetect.c
@@ -108,7 +108,7 @@ void run_test(const uint8_t *data, size_t len, char *expected)
static int testnum;
assert(hubbub_charset_extract(data, len,
- &mibenum, &source) == HUBBUB_OK);
+ &mibenum, &source) == PARSERUTILS_OK);
assert(mibenum != 0);
diff --git a/test/parser.c b/test/parser.c
index 0670ebf..93bdad2 100644
--- a/test/parser.c
+++ b/test/parser.c
@@ -24,7 +24,7 @@ static int run_test(int argc, char **argv, unsigned int CHUNK_SIZE)
hubbub_parser *parser;
hubbub_parser_optparams params;
FILE *fp;
- size_t len, origlen;
+ size_t len;
uint8_t *buf = malloc(CHUNK_SIZE);
const char *charset;
hubbub_charset_source cssource;
@@ -46,7 +46,7 @@ static int run_test(int argc, char **argv, unsigned int CHUNK_SIZE)
}
fseek(fp, 0, SEEK_END);
- origlen = len = ftell(fp);
+ len = ftell(fp);
fseek(fp, 0, SEEK_SET);
while (len > 0) {
diff --git a/test/tokeniser.c b/test/tokeniser.c
index e71cdcd..717e34e 100644
--- a/test/tokeniser.c
+++ b/test/tokeniser.c
@@ -26,7 +26,7 @@ int main(int argc, char **argv)
hubbub_tokeniser *tok;
hubbub_tokeniser_optparams params;
FILE *fp;
- size_t len, origlen;
+ size_t len;
#define CHUNK_SIZE (4096)
uint8_t buf[CHUNK_SIZE];
@@ -53,7 +53,7 @@ int main(int argc, char **argv)
}
fseek(fp, 0, SEEK_END);
- origlen = len = ftell(fp);
+ len = ftell(fp);
fseek(fp, 0, SEEK_SET);
while (len > 0) {
@@ -63,7 +63,7 @@ int main(int argc, char **argv)
break;
assert(parserutils_inputstream_append(stream,
- buf, bytes_read) == HUBBUB_OK);
+ buf, bytes_read) == PARSERUTILS_OK);
len -= bytes_read;
diff --git a/test/tokeniser2.c b/test/tokeniser2.c
index 780c646..443b71d 100644
--- a/test/tokeniser2.c
+++ b/test/tokeniser2.c
@@ -149,7 +149,7 @@ void run_test(context *ctx)
ctx->last_start_tag);
assert(parserutils_inputstream_append(stream,
- buf, len - 1) == HUBBUB_OK);
+ buf, len - 1) == PARSERUTILS_OK);
assert(hubbub_tokeniser_run(tok) == HUBBUB_OK);
@@ -196,10 +196,10 @@ void run_test(context *ctx)
&params) == HUBBUB_OK);
assert(parserutils_inputstream_append(stream,
- ctx->input, ctx->input_len) == HUBBUB_OK);
+ ctx->input, ctx->input_len) == PARSERUTILS_OK);
assert(parserutils_inputstream_append(stream, NULL, 0) ==
- HUBBUB_OK);
+ PARSERUTILS_OK);
printf("Input: '%.*s' (%d)\n", (int) ctx->input_len,
(const char *) ctx->input,
diff --git a/test/tokeniser3.c b/test/tokeniser3.c
index c74c9aa..9f0f84e 100644
--- a/test/tokeniser3.c
+++ b/test/tokeniser3.c
@@ -147,7 +147,7 @@ void run_test(context *ctx)
ctx->last_start_tag);
assert(parserutils_inputstream_append(stream,
- buf, len - 1) == HUBBUB_OK);
+ buf, len - 1) == PARSERUTILS_OK);
assert(hubbub_tokeniser_run(tok) == HUBBUB_OK);
@@ -200,13 +200,13 @@ void run_test(context *ctx)
for (j = 0; j < ctx->input_len; j++) {
assert(parserutils_inputstream_append(stream,
ctx->input + j, 1) ==
- HUBBUB_OK);
+ PARSERUTILS_OK);
assert(hubbub_tokeniser_run(tok) == HUBBUB_OK);
}
assert(parserutils_inputstream_append(stream, NULL, 0) ==
- HUBBUB_OK);
+ PARSERUTILS_OK);
assert(hubbub_tokeniser_run(tok) == HUBBUB_OK);
diff --git a/test/tree.c b/test/tree.c
index d8319e6..9896df8 100644
--- a/test/tree.c
+++ b/test/tree.c
@@ -90,7 +90,7 @@ static int run_test(int argc, char **argv, unsigned int CHUNK_SIZE)
hubbub_parser *parser;
hubbub_parser_optparams params;
FILE *fp;
- size_t len, origlen;
+ size_t len;
uint8_t *buf = malloc(CHUNK_SIZE);
const char *charset;
hubbub_charset_source cssource;
@@ -125,7 +125,7 @@ static int run_test(int argc, char **argv, unsigned int CHUNK_SIZE)
}
fseek(fp, 0, SEEK_END);
- origlen = len = ftell(fp);
+ len = ftell(fp);
fseek(fp, 0, SEEK_SET);
while (len > 0) {