grub-devel
[Top][All Lists]
Advanced

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

Warnings in kern/dl.c


From: Pavel Roskin
Subject: Warnings in kern/dl.c
Date: Fri, 18 Jul 2008 01:38:55 -0400
User-agent: Internet Messaging Program (IMP) H3 (4.1.4)

Hello, Bean!

I think this change from the x86_64 EFI patch should be reverted:

        * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
         GRUB_TARGET_SIZEOF_VOID_P.

It causes warnings when compiling grub-emu on x64_64 for i386:

kern/dl.c: In function 'grub_dl_resolve_symbols':
kern/dl.c:357: warning: cast from pointer to integer of different size
kern/dl.c:368: warning: cast from pointer to integer of different size
kern/dl.c:370: warning: cast to pointer from integer of different size
kern/dl.c:376: warning: cast from pointer to integer of different size
kern/dl.c:378: warning: cast to pointer from integer of different size
kern/dl.c:382: warning: cast to pointer from integer of different size
kern/dl.c:384: warning: cast to pointer from integer of different size
kern/dl.c:389: warning: cast from pointer to integer of different size

I'm really close to eliminating all warnings, and such additions are not making me happy.

The warnings could be suppressed somehow, but I don't think it's the right thing to do. 64-bit grub-emu cannot load 32-bit modules (and vice versa). 64-bit grub-emu could load 64-bit modules in principle, although we don't compile them. We could compile special grub-emu modules, but I would not spend any serious effort on it.

Anyway, I would prefer that we compile support for loading 64-bit modules and possibly catch some useful warnings relevant to 64-bit platforms (even if our target is 32-bit). It's better than to "implement" cross-architecture loading of modules that would not work anyway by filling the code with casts. It's better than to tolerate several warnings. Either increases the risk that a real warning would be missed.

--
Regards,
Pavel Roskin




reply via email to

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