Skip to content
Commit ba0410e8 authored by Etienne Carriere's avatar Etienne Carriere Committed by tarek-arm
Browse files

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: default avatarEtienne Carriere <etienne.carriere@foss.st.com>
parent 299e59b4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment