casaroli opened a new pull request, #3878: URL: https://github.com/apache/nuttx-apps/pull/3878
## Summary Five programs print the `events` or `revents` field of `struct pollfd` with `PRIx32`. This format is correct only while the field is a 32-bit `pollevent_t`. POSIX gives these fields the type `short`, and on 32-bit Arm `PRIx32` is `"lx"`, so a `short` value gives a `-Wformat` error. This PR casts the value to `unsigned int` and prints it with `%x`, which is correct for both types. The first commit fixes two older problems that `tools/checkpatch.sh` reports in the touched files: a `printf()` call one column too far right in `examples/poll/poll_listener.c`, and the typo REVIST in two comments in `graphics/twm4nx/src/cinput.cxx`. ## Impact Debug and error messages only. No change in behaviour. ## Testing `qemu-armv7a:nsh` with `EXAMPLES_POLL`, `NETUTILS_PTPD` (with `DEBUG_PTP_WARN`), `NETUTILS_THTTPD` and the network options they need, built with `-Werror` against nuttx master and against a nuttx tree where `events` and `revents` are `short`: both build with no compiler warning. `graphics/twm4nx` and the kernel socket test suite are not in this build (the change there is the same cast). The `fwinfo()` call in `netutils/thttpd/fdwatch.c` is compiled only with `CONFIG_THTTPD_FDWATCH_DEBUG`, which `fdwatch.h` undefines. `tools/checkpatch.sh -c -u -m -g` passes. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
