]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
build: fix a build warning on 32 bit systems in shuf.c
authorPádraig Brady <P@draigBrady.com>
Thu, 11 Jul 2013 02:20:18 +0000 (03:20 +0100)
committerPádraig Brady <P@draigBrady.com>
Thu, 11 Jul 2013 02:24:06 +0000 (03:24 +0100)
Prompted by the continuous integration build failure at:
http://hydra.nixos.org/build/5508873

* src/shuf.c (write_random_numbers): Convert to an int type
that matches the prinft format spec.

src/shuf.c

index a8c1d8530dc933aae1b5a9faec00d6c95d6f0ff3..f7fc9369c4ba53633fe435421eb594eb3a749e65 100644 (file)
@@ -350,7 +350,7 @@ write_random_numbers (struct randint_source *s, size_t count,
 
   for (i = 0; i < count; i++)
     {
-      randint j = lo_input + randint_choose (s, range);
+      unsigned long int j = lo_input + randint_choose (s, range);
       if (printf ("%lu%c", j, eolbyte) < 0)
         return -1;
     }