lkml.org 
[lkml]   [2004]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH (updated)] Avoid annoying build warning on 32-bit platforms
On Wed, Oct 20, 2004 at 03:23:43AM -0700, Chris Wedgwood wrote:
> Avoid annoying gcc warning on 32-bit platforms.
>
> Signed-off-by: cw@f00f.org
>
> ===== drivers/char/random.c 1.57 vs edited =====
> --- 1.57/drivers/char/random.c 2004-10-05 14:21:53 -07:00
> +++ edited/drivers/char/random.c 2004-10-20 03:19:17 -07:00
> @@ -818,12 +818,10 @@ static void add_timer_randomness(struct
> * jiffies.
> */
> time = get_cycles();
> - if (time != 0) {
> - if (sizeof(time) > 4)
> - num ^= (u32)(time >> 32);
> - } else {
> + if (time)
> + num ^= (u32)((time >> 32) >> 1);
^^
32 + 1 != 32.

> + else
> time = jiffies;
> - }

Jakub
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:07    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site