diff options
author | Dmitri Pal <dpal@redhat.com> | 2009-09-27 22:43:42 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2009-10-05 10:32:08 -0400 |
commit | b40f097afda4357e523e6c05fe9e81afca863c2a (patch) | |
tree | f41f6d20caea897a94438994a24a6e269045e7a1 /elapi | |
parent | 36cc4b7617cbca673de31bd8fca45094bc663c6d (diff) | |
download | ding-libs-b40f097afda4357e523e6c05fe9e81afca863c2a.tar.gz ding-libs-b40f097afda4357e523e6c05fe9e81afca863c2a.tar.xz ding-libs-b40f097afda4357e523e6c05fe9e81afca863c2a.zip |
ELAPI Fixing warnings in the example
Diffstat (limited to 'elapi')
-rw-r--r-- | elapi/elapi_test/elapi_ut.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/elapi/elapi_test/elapi_ut.c b/elapi/elapi_test/elapi_ut.c index ab0f88d..92c3aa3 100644 --- a/elapi/elapi_test/elapi_ut.c +++ b/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"); |