huojianchaoyy opened a new pull request, #4213: URL: https://github.com/apache/nuttx-apps/pull/4213
*Note: Please adhere to [Contributing Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).* ## Summary - **nshlib/nsh_dbgcmds: set all of struct dbgmem_s in mem_parse()**: `mem_parse()` left `dm_write` and `dm_value` unset when it returned `-EINVAL`. The callers use the structure only when `mem_parse()` returns 0, but GCC cannot always see that. With the GCC PGO instrumentation options it reports `'mem.dm_value' may be used uninitialized [-Werror=maybe-uninitialized]` for `cmd_mw()` on `qemu-armv8a:nsh_smp`. Clear the whole structure first. The PGO support that needs this is in the apache/nuttx libgcc PGO PR. ## Impact None at run time. The result of `mb`/`mh`/`mw` does not change. ## Testing Host: Ubuntu 22.04 (Linux 6.8, x86_64), aarch64-none-elf-gcc 13.4, CMake 3.23 with Ninja. `./tools/checkpatch.sh -c -u -m -g HEAD~1..HEAD` passes. `qemu-armv8a:nsh_smp` with `CONFIG_COVERAGE_MINI=y`, `CONFIG_COVERAGE_ALL=y` and `CONFIG_COVERAGE_PGO=y` on the nuttx PGO branch: the build fails with the error above before this change and builds after it. -- 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]
