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)
      |                                                        ^~
This commit is contained in:
Emmanuel Fleury 2020-11-17 00:42:20 +01:00
parent dfdab13682
commit 5515dda6e6

View File

@ -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
{