mirror of https://github.com/ArduPilot/ardupilot
CPUInfo: cast result of sizeof to unsigned long
That fix works when size_t is 32 or 64 bits.
This commit is contained in:
parent
2410575d6c
commit
de96ca95a6
|
@ -18,13 +18,13 @@ void setup() {
|
|||
static void show_sizes(void)
|
||||
{
|
||||
hal.console->println("Type sizes:");
|
||||
hal.console->printf("char : %lu\n", sizeof(char));
|
||||
hal.console->printf("short : %lu\n", sizeof(short));
|
||||
hal.console->printf("int : %lu\n", sizeof(int));
|
||||
hal.console->printf("long : %lu\n", sizeof(long));
|
||||
hal.console->printf("long long : %lu\n", sizeof(long long));
|
||||
hal.console->printf("bool : %lu\n", sizeof(bool));
|
||||
hal.console->printf("void* : %lu\n", sizeof(void *));
|
||||
hal.console->printf("char : %lu\n", (unsigned long)sizeof(char));
|
||||
hal.console->printf("short : %lu\n", (unsigned long)sizeof(short));
|
||||
hal.console->printf("int : %lu\n", (unsigned long)sizeof(int));
|
||||
hal.console->printf("long : %lu\n", (unsigned long)sizeof(long));
|
||||
hal.console->printf("long long : %lu\n", (unsigned long)sizeof(long long));
|
||||
hal.console->printf("bool : %lu\n", (unsigned long)sizeof(bool));
|
||||
hal.console->printf("void* : %lu\n", (unsigned long)sizeof(void *));
|
||||
|
||||
hal.console->printf("printing NaN: %f\n", sqrt(-1.0f));
|
||||
hal.console->printf("printing +Inf: %f\n", 1.0f/0.0f);
|
||||
|
|
Loading…
Reference in New Issue