Fixed Build warning wfd_util_get_access_list 60/40560/3
authorNishant Chaprana <n.chaprana@samsung.com>
Fri, 5 Jun 2015 06:25:34 +0000 (11:55 +0530)
committerNishant Chaprana <n.chaprana@samsung.com>
Fri, 5 Jun 2015 06:37:13 +0000 (23:37 -0700)
Description: This patch removes build warning in
wfd_util_get_access_list, in this funtion integer was compared
to NULL, which is wrong and was generating warning.

As per man pages:
fgets return char* and it's ouput was assigned to an integer

] wifi-direct-util.c: In function 'wfd_util_get_access_list':
] warning: assignment makes integer from pointer without a cast
]   while ((res = fgets(device_info, MACSTR_LEN + DEV_NAME_LEN + 2, fd)) != NULL)
]               ^
] warning: comparison between pointer and integer
]   while ((res = fgets(device_info, MACSTR_LEN + DEV_NAME_LEN + 2, fd)) != NULL)
]                                                                        ^

Change-Id: I7600a44ecc808f15f11649206606313fe614e835
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
packaging/wifi-direct-manager.spec
src/wifi-direct-util.c

index fc0194c..7879207 100644 (file)
@@ -1,6 +1,6 @@
 Name:       wifi-direct-manager
 Summary:    Wi-Fi Direct manger
-Version:    1.0.11
+Version:    1.0.12
 Release:    1
 Group:      Network & Connectivity/Wireless
 License:    Apache-2.0
index 22e8085..f6d1518 100644 (file)
@@ -401,7 +401,7 @@ int wfd_util_get_access_list(GList **access_list)
                return -1;
        }
 
-       while ((res = fgets(device_info, MACSTR_LEN + DEV_NAME_LEN + 2, fd)) != NULL)
+       while (fgets(device_info, MACSTR_LEN + DEV_NAME_LEN + 2, fd) != NULL)
        {
                if (device_info[0] == '\0') {
                        printf("end of list\n");