This is an automated email from the ASF dual-hosted git repository. cederom pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push: new a7020e45c benchmarks/osperf: fix warning maybe-uninitialized a7020e45c is described below commit a7020e45cc21ad01ab31439fa2586dd2a538f9aa Author: chenrun1 <chenr...@xiaomi.com> AuthorDate: Wed Dec 25 11:32:14 2024 +0800 benchmarks/osperf: fix warning maybe-uninitialized Summary: In function 'performance_gettime', inlined from 'hpwork_performance' at osperf.c:245:10: osperf.c:123:3: error: 'result.end' may be used uninitialized [-Werror=maybe-uninitialized] 123 | up_perf_convert(result->end - result->start, &ts); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ osperf.c: In function 'hpwork_performance': osperf.c:228:29: note: 'result.end' was declared here 228 | struct performance_time_s result; | ^~~~~~ CC: audio/lib_buffer.c CC: common/arm64_initialize.c CC: builtin/lib_builtin_getname.c Signed-off-by: chenrun1 <chenr...@xiaomi.com> --- benchmarks/osperf/osperf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/benchmarks/osperf/osperf.c b/benchmarks/osperf/osperf.c index 36c1f4914..c5b680613 100644 --- a/benchmarks/osperf/osperf.c +++ b/benchmarks/osperf/osperf.c @@ -239,6 +239,7 @@ static size_t hpwork_performance(void) (FAR void *)&result }; + memset(&result, 0, sizeof(result)); memset(&work, 0, sizeof(work)); performance_start(&result); ret = work_queue(HPWORK, &work, work_handle, args, 0);