framework: __fwk_slist_next() does modify argument list
Fixes attribute of __fwk_slist_next() first argument (list reference)
from FWK_UNTOUCHED to FWK_READ_ONLY1 as it is read by the function
when built in debug mode.
Before this change was GCC 12.2 to emit the below warning message
when building in debug mode:
framework/src/fwk_slist.c: In function ‘__fwk_slist_next’:
framework/src/fwk_slist.c:111:16: warning: ‘list’ may be used uninitialized [-Wmaybe-uninitialized]
111 | fwk_assert(__fwk_slist_contains(list, node));
| ^~~~~~~~~~~~~~~~~~~~
framework/src/fwk_slist.c:105:29: note: accessing argument 1 of a function declared with attribute ‘access (none, 1)’
105 | const struct fwk_slist *list,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~
Change-Id: I1a3f4911daf7c0539cd82a9a9011509bae180c49
Signed-off-by:
Etienne Carriere <etienne.carriere@foss.st.com>
Loading
Please register or sign in to comment