lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 22 Jul 2007 18:39:10 -0500
From:	James Bottomley <James.Bottomley@...senPartnership.com>
To:	Cédric Augonnet <cedric.augonnet@...il.com>
Cc:	Gabriel C <nix.or.die@...glemail.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	J.E.J.Bottomley@...senPartnership.com
Subject: Re: voyager_{thread,cat}.c compile warnings

On Sun, 2007-07-22 at 18:49 -0400, Cédric Augonnet wrote:
> iff -urN a/arch/i386/mach-voyager/voyager_cat.c
> b/arch/i386/mach-voyager/voyager_cat.c
> --- /home/gonnet/tmp/linux-2.6.22/arch/i386/mach-voyager/voyager_cat.c  2007-07-20 11:50:17.000000000 -0400
> +++ linux-2.6.22/arch/i386/mach-voyager/voyager_cat.c   2007-07-22
> 11:24:34.000000000 -0400
> @@ -682,7 +682,7 @@
>                         outb(VOYAGER_CAT_END, CAT_CMD);
>                         continue;
>                 }
> -               if(eprom_size > sizeof(eprom_buf)) {
> +               if((unsigned)eprom_size > sizeof(eprom_buf)) {

Actually, no.  If gcc can deduce that the comparison is always false
then I want it not to build the body of the if.  The only thing I don't
know how to do is to shut up the warning in this case.  What you've done
is make gcc pretend it doesn't know the if is always false.

>                         printk("**WARNING**: Voyager insufficient size
> to read EPROM data, module 0x%x.  Need %d\n", i, eprom_size);
>                         outb(VOYAGER_CAT_END, CAT_CMD);
>                         continue;
> @@ -752,7 +752,7 @@
>                         outb(VOYAGER_CAT_END, CAT_CMD);
>                         continue;
>                 }
> -               if(eprom_size > sizeof(eprom_buf)) {
> +               if((unsigned)eprom_size > sizeof(eprom_buf)) {
>                         printk("**WARNING**: Voyager insufficient size
> to read EPROM data, module 0x%x.  Need %d\n", i, eprom_size);
>                         outb(VOYAGER_CAT_END, CAT_CMD);
>                         continue;
> diff -urN a/arch/i386/mach-voyager/voyager_thread.c
> b/arch/i386/mach-voyager/voyager_thread.c
> --- /home/gonnet/tmp/linux-2.6.22/arch/i386/mach-voyager/voyager_thread.c       2007-07-20 11:50:17.000000000 -0400
> +++
> linux-2.6.22/arch/i386/mach-voyager/voyager_thread.c        2007-07-22
> 11:27:13.000000000 -0400
> @@ -92,7 +92,7 @@
>         }
>  }
>  
> -static int
> +static void
>  thread(void *unused)
>  {
>         printk(KERN_NOTICE "Voyager starting monitor thread\n");

You didn't actually compile this, did you?  Apparently the signature of
the kthread_run function changed from returning void to returning int.
Unfortunately the person who fixed this up forgot to add a return 0 at
the end of the voyager thread() function .. which is the correct fix.

James


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ