From 70b0f90d49bc5b89d700c4275641d5133b8a2ee0 Mon Sep 17 00:00:00 2001 From: Dmitri Pal Date: Sun, 27 Sep 2009 22:43:42 -0400 Subject: ELAPI Fixing warnings in the example --- common/elapi/elapi_test/elapi_ut.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'common') diff --git a/common/elapi/elapi_test/elapi_ut.c b/common/elapi/elapi_test/elapi_ut.c index ab0f88d1..92c3aa31 100644 --- a/common/elapi/elapi_test/elapi_ut.c +++ b/common/elapi/elapi_test/elapi_ut.c @@ -30,7 +30,7 @@ #define APPNAME "elapi_ut" #define ELAPI_CONFIG_FILE "elapi_ut.conf" -typedef (*test_fn)(void); +typedef int (*test_fn)(void); int elapi_init_test(void) { @@ -443,7 +443,14 @@ int main(int argc, char *argv[]) int i = 0; printf("Start\n"); - while (t = tests[i++]) { + /* I added second pair of parentheses in the while below + * becuase of the following warning I got: + * warning: suggest parentheses around assignment used as truth value + * + * There was a suggestion in general to add less parentheses... + * well it seems that compiler wants this one. + */ + while ((t = tests[i++])) { error = t(); if (error) { printf("Failed!\n"); -- cgit