[glib: 1/11] Fix signedness warning in gio/gsubprocess.c:child_setup()
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/11] Fix signedness warning in gio/gsubprocess.c:child_setup()
- Date: Wed, 13 Jan 2021 11:50:54 +0000 (UTC)
commit 5515dda6e6669cdddb51be71e1dce61d3bcfca4b
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date: Tue Nov 17 00:42:20 2020 +0100
Fix signedness warning in gio/gsubprocess.c:child_setup()
gio/gsubprocess.c: In function ‘child_setup’:
gio/gsubprocess.c:271:56: error: comparison of integer expressions of different signedness: ‘gint’ {aka
‘int’} and ‘guint’ {aka ‘unsigned int’}
271 | if (child_data->fds[i] != -1 && child_data->fds[i] != i)
| ^~
gio/gsubprocess.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gio/gsubprocess.c b/gio/gsubprocess.c
index 4bf1f6b88..a18ed73c1 100644
--- a/gio/gsubprocess.c
+++ b/gio/gsubprocess.c
@@ -256,7 +256,7 @@ static void
child_setup (gpointer user_data)
{
ChildData *child_data = user_data;
- gint i;
+ guint i;
gint result;
int errsv;
@@ -268,7 +268,7 @@ child_setup (gpointer user_data)
* have been created O_CLOEXEC.
*/
for (i = 0; i < 3; i++)
- if (child_data->fds[i] != -1 && child_data->fds[i] != i)
+ if (child_data->fds[i] != -1 && child_data->fds[i] != (gint) i)
{
do
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]