[U-Boot] sh: build warnings in clock code

Nobuhiro Iwamatsu iwamatsu at nigauri.org
Wed Feb 22 02:21:40 CET 2012


Hi,

Thanks , I will check this and fix.

Best regards,
  Nobuhiro

2012/2/16 Mike Frysinger <vapier at gentoo.org>:
> all superh boards hit this warning for me:
>
> Configuring for sh7763rdp board...
> time.c: In function 'get_ticks':
> time.c:111:16: warning: variable 'ticks' set but not used [-Wunused-but-set-
> variable]
>
> and indeed, looking at the code, ticks is set but not used.  not sure if bug
> (ticks should be used), or just delete the variable ...
>
> unsigned long long get_ticks (void)
> {
>    unsigned long tcnt = 0 - readl(TCNT0);
>    unsigned long ticks;
>
>    if (last_tcnt > tcnt) { /* overflow */
>        overflow_ticks++;
>        ticks = (0xffffffff - last_tcnt) + tcnt;
>    } else {
>        ticks = tcnt;
>    }
>    last_tcnt = tcnt;
>
>    return (overflow_ticks << 32) | tcnt;
> }
> -mike
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>



-- 
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6


More information about the U-Boot mailing list