From 1b3d5704c007bbff81dcb1896e359c1932c07590 Mon Sep 17 00:00:00 2001 From: "psyc://psyced.org/~lynX" <@> Date: Wed, 20 Apr 2011 17:15:03 +0200 Subject: [PATCH] stupid gcc wants me to put extra () around the ret = --- include/psyc/parser.h | 2 +- tests/Makefile | 2 +- tests/testParser.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/psyc/parser.h b/include/psyc/parser.h index d54744d..f03f6b4 100644 --- a/include/psyc/parser.h +++ b/include/psyc/parser.h @@ -121,7 +121,7 @@ typedef enum typedef struct { size_t length; - const uint8_t * ptr; + const uint8_t * ptr; // just an unsigned char for opaque data } PSYC_Array; /** diff --git a/tests/Makefile b/tests/Makefile index a9c8fe2..3f4dec0 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,5 +1,5 @@ CFLAGS=-I../include -DDEBUG -g -O0 -Wall -LDFLAGS=-L.. +LDFLAGS=-L../src LOADLIBES=-lpsyc TARGETS=testParser testMatch diff --git a/tests/testParser.c b/tests/testParser.c index a704409..7020354 100644 --- a/tests/testParser.c +++ b/tests/testParser.c @@ -24,7 +24,7 @@ int main(int argc, char** argv) PSYC_nextBuffer(&state, PSYC_createArray(buffer, index)); // try parsing that now - while (ret = PSYC_parse(&state, &modifier, &name, &value)) + while ((ret = PSYC_parse(&state, &modifier, &name, &value))) { switch (ret) { @@ -41,7 +41,7 @@ int main(int argc, char** argv) write(1, ">>> LIST START\n", 15); PSYC_initListState(&listState); PSYC_nextListBuffer(&listState, value); - while (ret = PSYC_parseList(&listState, &name, &value, &elem)) + while ((ret = PSYC_parseList(&listState, &name, &value, &elem))) { switch (ret) {