[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] maint: avoid overflow warning in xargs

From: Bernhard Voelker
Subject: [PATCH] maint: avoid overflow warning in xargs
Date: Fri, 2 Aug 2013 14:22:37 +0200

xargs.c: In function 'xargs_do_exec':
xargs.c:1274:2: warning: overflow in implicit constant conversion [-Woverflow]

* xargs/xargs.c (xargs_do_exec): s/ int r;/ size_t r;/
The gnulib function safe_read returns size_t.
 xargs/xargs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xargs/xargs.c b/xargs/xargs.c
index 35c1198..5e373f2 100644
--- a/xargs/xargs.c
+++ b/xargs/xargs.c
@@ -1173,7 +1173,7 @@ xargs_do_exec (struct buildcmd_control *ctl, void 
*usercontext, int argc, char *
   pid_t child;
   int fd[2];
   int buf;
-  int r;
+  size_t r;
   (void) ctl;
   (void) argc;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]