On 07.27, Sam Ravnborg wrote:
> On Fri, Jul 15, 2005 at 10:14:43PM +0000, J.A. Magallon wrote:
> >
> > On 07.16, J.A. Magallon wrote:
> > >
> > > On 07.15, Andrew Morton wrote:
> > > >
> > > > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.13-rc3/2.6.13-rc3-mm1/
> > > >
> >
> > This time I did not break anything... and they shut up gcc4 ;)
>
> I have applied it to my tree. There still is a lot left when I compile
> with -Wsign-compare.
>
All the problems are born here:
struct sym_entry {
unsigned long long addr;
unsigned int len;
unsigned char *sym;
};
I suppose you want sym to be an unsigned char to store the type and to do
the checksum math in there.
And why use a 64bit address in 32bit archs ?. There is no math involved
with 'addr', so you can make it a pointer and let the compiler decide its
size.
Why don't you do something like:
struct sym_entry {
void *addr;
unsigned char type;
unsigned short len;
union {
unsigned char data[KSYM_NAME_LEN+1];
char name[KSYM_NAME_LEN+1];
};
};
Option b) is identify the five lines that do the checksum math and plague
them with (unsigned char) casts...
Will try to do it...
--
J.A. Magallon <jamagallon()able!es> \ Software is like sex:
werewolf!able!es \ It's better when it's free
Mandriva Linux release 2006.0 (Cooker) for i586
Linux 2.6.12-jam10 (gcc 4.0.1 (4.0.1-0.2mdk for Mandriva Linux release 2006.0))
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
|
|