I'm trying to make something out of the Kreyos Meteor firmware (
https://github.com/KreyosMeteorite/KreyosFirmware-gcc-elf ), and it makes some use of Pawn. When I ported it over to TI's gcc for MSP430, I began getting warnings:
watch/host.c: In function ‘script_process’:
watch/host.c:211:23: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
amx_Push(amx, (cell)rparam);
with "(cell)rparam" indicated as the culprit, and rparam being a void *:
uint8_t script_process(uint8_t event, uint16_t lparam, void* rparam) {
...
amx_Push(amx, (cell)rparam);
...
}
https://github.com/KreyosMeteorite/KreyosFirmware-gcc-elf/blob/master/Watch/watch/host.c#L211The code specifies a cell size of 16, which obviously is smaller than the CPU address space of 20 bits. Should I go through the code and make sure it assumes a cell size of 32 bits to get rid of this warning, or are there other, perhaps better and more space efficient ways to do it?