I recently upgraded our FXT009 OpenAT app from R7.43 to R7.45 which meant also changing from the ELF to EABI compiler. I also noticed that with “int” type changed from 32 bits to 64 bits. I now get warnings about all my printf formats using the wrong types.
Is there some way to configure the compiler for the correct “int” size for the ARM9 processor, or did I miss something in my upgrade?
This is precisely why you should never use the “raw” ‘C’ types!
SiWi provides wm_types.h specifically for this purpose…
I am using “s32” from wm_types.h. It is defined like this:
typedef int32_t s32;
The “int32_t” is defined in EBI compiler version of stdint.h as:
typedef signed long int32_t;
But in the ELF compiler version of stdint.h it is defined as:
typedef int int32_t;
So now I have to type cast my s32 variables in printf’s with (int)s32Var.
So you have basically the same problem as this: https://forum.sierrawireless.com/t/how-to-override-a-plugins-header-file/4951/1
Note that long is not necessarily 64 bits…