coreutils
[Top][All Lists]
Advanced

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

[PATCH] build: fix a build warning on 32 bit systems in shuf.c


From: Pádraig Brady
Subject: [PATCH] build: fix a build warning on 32 bit systems in shuf.c
Date: Thu, 11 Jul 2013 03:31:18 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

commit b45c5a7cf04b9f304cc4223dab3b98dda6874527
Author: Pádraig Brady <address@hidden>
Date:   Thu Jul 11 03:20:18 2013 +0100

    build: fix a build warning on 32 bit systems in shuf.c

    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.

diff --git a/src/shuf.c b/src/shuf.c
index a8c1d85..f7fc936 100644
--- a/src/shuf.c
+++ b/src/shuf.c
@@ -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;
     }



reply via email to

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