casaroli opened a new pull request, #21494: URL: https://github.com/apache/nuttx/pull/21494
## Summary With `CONFIG_NET_LOCAL_DGRAM` off, `local_recvmsg()` sets `buf`, `from` and `fromlen` and does not use them. A build with `-Werror` fails: ``` local/local_recvmsg.c: error: variable 'buf' set but not used [-Werror=unused-but-set-variable] local/local_recvmsg.c: error: unused variable 'from' [-Werror=unused-variable] local/local_recvmsg.c: error: unused variable 'fromlen' [-Werror=unused-variable] ``` This PR uses the fields of the message in the datagram branch, the only user. ## Impact No change in behaviour. Without `-Werror`, the same build only gave warnings. Flat, protected and kernel builds; no architecture code. ## Testing Builds of `qemu-armv8a:nsh` with `NET`, `NET_LOCAL`, `PIPES`, `NETDEV_LATEINIT`, `NET_SOCKOPTS` and `EXTRAFLAGS="-Wno-cpp -Werror"`, each OK: stream sockets only, datagram sockets only, and both. This is a build fix, so no new test. `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]
