raspberrypi / userland

Source code for ARM side libraries for interfacing to Raspberry Pi GPU.
BSD 3-Clause "New" or "Revised" License
2.05k stars 1.09k forks source link

Fix a compiler warning #629

Closed ghost closed 4 years ago

ghost commented 4 years ago

This fixes the warning format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ {aka ‘long unsigned int’}

JamesH65 commented 4 years ago

https://stackoverflow.com/questions/2524611/how-can-one-print-a-size-t-variable-portably-using-the-printf-family would seem to indicate %zu is appropriate for architecture agnostic code (ie 32 and 64)

Were you compiling on a 64bit system?

ghost commented 4 years ago

Yes, I compiled using an ARM64 OS, I fixed the issue now.

popcornmix commented 4 years ago

Looks okay - thanks.