framework: __fwk_dlist_remove() does modify argument list
Fixes attribute of __fwk_dlist_remove() 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 build warning when
building in debug mode:
framework/src/fwk_dlist.c: In function ‘__fwk_dlist_remove’:
framework/src/fwk_dlist.c:76:12: warning: ‘list’ may be used uninitialized [-Wmaybe-uninitialized]
76 | assert(__fwk_slist_contains(
| ^~~~~~~~~~~~~~~~~~~~
framework/src/fwk_dlist.c:67:23: note: accessing argument 1 of a function declared with attribute ‘access (none, 1)’
67 | struct fwk_dlist *list,
| ~~~~~~~~~~~~~~~~~~^~~~
Change-Id: I5027e1bfaaf8615784dbe963aca6ccb564e8f352
Signed-off-by:
Etienne Carriere <etienne.carriere@foss.st.com>
Loading
Please register or sign in to comment