[Xfce4-commits] [apps/xfce4-taskmanager] 01/01: Use a gint since fgetc returns an int. (#10417)

noreply at xfce.org noreply at xfce.org
Wed Dec 3 17:27:58 CET 2014


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

landry pushed a commit to branch master
in repository apps/xfce4-taskmanager.

commit 97f974f7a83199fe94cd2a80c30eb5cd35e5a552
Author: Landry Breuil <landry at xfce.org>
Date:   Wed Dec 3 17:26:42 2014 +0100

    Use a gint since fgetc returns an int. (#10417)
    
    Should fix a warning on arm, and maybe other issues there..
---
 src/task-manager-linux.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/task-manager-linux.c b/src/task-manager-linux.c
index dbbecaa..96403cd 100644
--- a/src/task-manager-linux.c
+++ b/src/task-manager-linux.c
@@ -128,7 +128,7 @@ get_task_cmdline (Task *task)
 	FILE *file;
 	gchar filename[96];
 	gint i;
-	gchar c;
+	gint c;
 
 	snprintf (filename, 96, "/proc/%i/cmdline", task->pid);
 	if ((file = fopen (filename, "r")) == NULL)
@@ -136,7 +136,7 @@ get_task_cmdline (Task *task)
 
 	/* Read full command byte per byte until EOF */
 	for (i = 0; (c = fgetc (file)) != EOF && i < (gint)sizeof (task->cmdline) - 1; i++)
-		task->cmdline[i] = (c == '\0') ? ' ' : c;
+		task->cmdline[i] = (c == '\0') ? ' ' : (gchar)c;
 	task->cmdline[i] = '\0';
 	if (task->cmdline[i-1] == ' ')
 		task->cmdline[i-1] = '\0';

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


More information about the Xfce4-commits mailing list