[syslinux] isohybrid.c:409: warning: cast from pointer to integer of different size
Ferenc Wagner
wferi at niif.hu
Tue May 4 09:27:20 PDT 2010
Geert Stappers <stappers at stappers.nl> writes:
>> +void
>> +display_mbr(const uint8_t *mbr, size_t len)
>> +{
>> + unsigned char c = 0;
>> + unsigned int i = 0, j = 0;
>> +
>> + printf("sizeof(MBR): %d bytes\n", len);
>> + for (i = 0; i < len; i++)
>> + {
>> + if (!(i % 16))
>> + printf("%08x ", (unsigned int)(mbr + i));
>
> That line yields at compile time:
>
> | isohybrid.c: In function 'display_mbr':
> | isohybrid.c:409: warning: cast from pointer to integer of different size
>
> What should be done to avoid that warning?
Isn't that a pointer-integer size mismatch? What architecture are you
working on? Anyway, pointers should be printed by %p, not by casting
into integers, methinks.
--
Cheers,
Feri.
More information about the Syslinux
mailing list