Re: [PATCH 1/2] Fix a build warning in scripts/sortextable.h

From: Michal Marek
Date: Wed Jul 03 2013 - 08:28:22 EST


On 3.7.2013 14:12, Daniel Tang wrote:
>> On 3.7.2013 14:06, Michal Marek wrote:
>>> On 9.6.2013 04:33, Daniel Tang wrote:
>>>> The pointer passed to the _r() macro does not always match the
>>>> type of the function that it is aliasing and raises several of
>>>> the following warnings at compile time:
>>>>
>>>> warning: passing argument 1 of ‘r8’ from incompatible pointer
>>>> type
>>>
>>> In what environment (arch, compiler, glibc) are you seeing this?
>>>
>
> I'm cross compiling the ARM arch with gcc version 4.7.2 on 64 bit OS
> X. It should throw that warning on any 64 bit environment (not just
> OS X) but I haven't tested it.

The cross compilation target should not matter, this is a host program.
It does work for me on Linux (openSUSE 12.3 FWIW), with gcc 4.7.2 and
glibc 2.17:

$ gcc -m64 -Wall -Wmissing-prototypes -Wstrict-prototypes -O2
-fomit-frame-pointer -Itools/include -o scripts/sortextable
scripts/sortextable.c; echo $?
0

What is the type of Elf64_Shdr::sh_offset in OS X's <elf.h>? In glibc,
this is Elf64_Off, which is a typedef name for uint64_t.

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