summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitri Pal <dpal@redhat.com>2009-09-27 22:43:42 -0400
committerStephen Gallagher <sgallagh@redhat.com>2009-10-05 10:32:08 -0400
commit70b0f90d49bc5b89d700c4275641d5133b8a2ee0 (patch)
tree31c09beebc87474a2d8378ce3b733d5ffa51f605
parenta78d04984240a3d04045402c964d9d8c5be463ef (diff)
downloadsssd-70b0f90d49bc5b89d700c4275641d5133b8a2ee0.tar.gz
sssd-70b0f90d49bc5b89d700c4275641d5133b8a2ee0.tar.xz
sssd-70b0f90d49bc5b89d700c4275641d5133b8a2ee0.zip
ELAPI Fixing warnings in the example
-rw-r--r--common/elapi/elapi_test/elapi_ut.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/common/elapi/elapi_test/elapi_ut.c b/common/elapi/elapi_test/elapi_ut.c
index ab0f88d..92c3aa3 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");