casaroli opened a new pull request, #3888:
URL: https://github.com/apache/nuttx-apps/pull/3888

   ## Summary
   
   apache/nuttx#20796 gives the `events` and `revents` fields of `struct 
pollfd` the type `short`, as POSIX does. A `short` value is promoted to `int`, 
so `%x` prints it as is. This PR removes the eight casts to `unsigned int` that 
#3878 added while the fields were a 32-bit `pollevent_t`, in `examples/poll`, 
`graphics/twm4nx`, `netutils/ptpd`, `netutils/thttpd` and the kernel socket 
test suite.
   
   This PR must merge after apache/nuttx#20796: with the 32-bit `pollevent_t` 
of master, `%x` without the cast is a `-Wformat` error on 32-bit Arm.
   
   ## Impact
   
   Debug and error messages only. No change in behaviour.
   
   ## Testing
   
   `qemu-armv7a:nsh` with `EXAMPLES_POLL`, `NETUTILS_PTPD` (with 
`DEBUG_PTP_WARN`, `NET_TIMESTAMP`), `NETUTILS_THTTPD` (with 
`-DCONFIG_THTTPD_FDWATCH_DEBUG` and `DEBUG_NET_INFO`, so the `fwinfo()` call is 
compiled) and the network options they need, built with `EXTRAFLAGS=-Werror` 
and arm-gnu-toolchain 13.2.Rel1:
   
   - against apache/nuttx#20796 (b02ec1eca72): the build passes with no warning;
   - against nuttx master: `poll_listener.c` stops the build with `format '%x' 
expects argument of type 'unsigned int', but argument 3 has type 'pollevent_t' 
{aka 'long unsigned int'}`, as expected.
   
   `graphics/twm4nx` and the kernel socket test suite are not in this build 
(the change there is the same). `tools/checkpatch.sh -c -u -m -g` passes.
   
   depends-on: [apache/nuttx/pull/20796]
   


-- 
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]

Reply via email to