Tools: hv: check return value of daemon to fix compiler warning.
PATCH 1/1 Tools: hv: check return value of daemon to fix compiler warning.
hv_kvp_daemon.c: In function 'main':
hv_kvp_daemon.c:1441:8: warning: ignoring return value of 'daemon', declared with attribute warn_unused_result [-Wunused-result]
Signed-off-by Olaf Hering <[email protected]>
--- tools/hv/hv_kvp_daemon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/hv/hv_kvp_daemon.c +2 -1
@@ -1439,7 +1439,8 @@ int main(void)char *kvp_recv_buffer;size_t kvp_recv_buffer_len; -daemon (1 ,0 ); +if (daemon (1 ,0 )) +return 1 ;openlog ("KVP" ,0 ,LOG_USER );syslog (LOG_INFO ,"KVP starting; pid is:%d" ,getpid ());
Quoted 10 lines
-----Original Message-----
From: Olaf Hering [mailto:[email protected]]
Sent: Thursday, August 01, 2013 8:43 AM
To: KY Srinivasan; [email protected]
Cc: [email protected]; Olaf Hering
Subject: [PATCH] Tools: hv: check return value of daemon to fix compiler warning.
Quoted 5 lines
hv_kvp_daemon.c: In function 'main':
hv_kvp_daemon.c:1441:8: warning: ignoring return value of 'daemon', declared with attributewarn_unused_result[-Wunused-result]Signed-off-by Olaf Hering <[email protected]>
Signed-off-by K. Y. Srinivasan <[email protected]>
Quoted 20 lines
--- tools/hv/hv_kvp_daemon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)tools/hv/hv_kvp_daemon.c +2
-1@@ -1439,7 +1439,8 @@ int main(void)char *kvp_recv_buffer;size_t kvp_recv_buffer_len; -daemon (1 ,0 ); +if (daemon (1 ,0 )) +return 1 ;openlog ("KVP" ,0 ,LOG_USER );syslog (LOG_INFO ,"KVP starting; pid is:%d" ,getpid ());