Building off of #310
Recent fixes (bd3914e, 173a069) addressed unchecked return values from memory_map_fixed and memory_purge. Adding __attribute__((warn_unused_result)) to the functions that return bool in memory.h would catch this class at compile time with -Werror.
Candidates: memory_map_fixed, memory_map_fixed_mte, memory_unmap, memory_protect_ro, memory_protect_rw, memory_protect_rw_metadata, memory_remap, memory_remap_fixed, memory_purge.
You could also add it to memory_set_name but every single call site ignores its return value so probably not worth it.
Building off of #310
Recent fixes (
bd3914e,173a069) addressed unchecked return values frommemory_map_fixedandmemory_purge. Adding__attribute__((warn_unused_result))to the functions that return bool inmemory.hwould catch this class at compile time with-Werror.Candidates:
memory_map_fixed,memory_map_fixed_mte,memory_unmap,memory_protect_ro,memory_protect_rw,memory_protect_rw_metadata,memory_remap,memory_remap_fixed,memory_purge.You could also add it to
memory_set_namebut every single call site ignores its return value so probably not worth it.