kendryte / k230_sdk

Kendryte K230 SDK
BSD 2-Clause "Simplified" License
165 stars 35 forks source link

opensbi: missing intialization #58

Closed xypron closed 5 months ago

xypron commented 6 months ago

GCC 13.2.0 detects that cnt may not be initialized. We must not assume that a local variable is 0 if we don't initialize it.

lib/utils/reset/fdt_reset_thead.c:23:23: error:
‘cnt’ may be used uninitialized [-Werror=maybe-uninitialized]
23 |         for (i = 0; i < cnt; i++) {
   |                     ~~^~~~~
wuwentao commented 5 months ago

Thank you very much for your PR and your contribution to the K230 open source project, we have merged your PR now.