seL4 / seL4_libs

No-assurance libraries for rapid-prototyping of seL4 apps.
https://docs.sel4.systems
Other
52 stars 62 forks source link

Compile warning #44

Closed bennoleslie closed 2 years ago

bennoleslie commented 2 years ago

I get the following compiler warning in libsel4debug. I'm not sure the write fix, presumably simply using %ld will cause errors on other platforms.

/home/benno/sel4test2/projects/seL4_libs/libsel4debug/src/caps.c: In function ‘debug_cap_identify’:
/home/benno/sel4test2/projects/seL4_libs/libsel4debug/src/caps.c:19:57: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘seL4_CPtr {aka long unsigned int}’ [-Wformat=]
     printf("DEBUG_BUILD not set, can't get type of cap %d", cap);
                                                        ~^
                                                        %ld
axel-h commented 2 years ago

This should use SEL4_PRIu_word.

kent-mcleod commented 2 years ago

Fixed in https://github.com/seL4/seL4_libs/pull/50/files