[Xfce4-commits] [apps/xfce4-screensaver] 320/425: gs-lock-plug.c: Fix build warning:

noreply at xfce.org noreply at xfce.org
Mon Oct 15 01:52:47 CEST 2018


This is an automated email from the git hooks/post-receive script.

b   l   u   e   s   a   b   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfce4-screensaver.

commit 64d47ad9e43da564ea4c2b2ae2dd4b1ca22a8770
Author: Pablo Barciela <scow at riseup.net>
Date:   Tue Jan 2 12:36:29 2018 +0100

    gs-lock-plug.c: Fix build warning:
    
    ignoring return value of ‘fscanf’, declared with attribute warn_unused_result
---
 src/gs-lock-plug.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/gs-lock-plug.c b/src/gs-lock-plug.c
index 4069b11..07993c5 100644
--- a/src/gs-lock-plug.c
+++ b/src/gs-lock-plug.c
@@ -190,7 +190,10 @@ process_is_running (const char * name)
         int num_processes;
         gchar *command = g_strdup_printf ("pidof %s | wc -l", name);
         FILE *fp = popen(command, "r");
-        fscanf(fp, "%d", &num_processes);
+
+        if (fscanf(fp, "%d", &num_processes) != 1)
+                num_processes = 0;
+
         pclose(fp);
         g_free (command);
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list