util: Add NONNULL macro
Macro leverages __attribute__((__nonnull__)) to help users mark the function parameter that isn't allowed to be NULL. Suggested-by: Eric Engestrom <eric@igalia.com> Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com> Reviewed-by: Eric Engestrom <eric@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18215>
This commit is contained in:

committed by
Marge Bot

parent
9bf104f934
commit
21dcde096f
@@ -916,6 +916,7 @@ endforeach
|
||||
_attributes = [
|
||||
'const', 'flatten', 'malloc', 'pure', 'unused', 'warn_unused_result',
|
||||
'weak', 'format', 'packed', 'returns_nonnull', 'alias', 'noreturn',
|
||||
'nonnull',
|
||||
]
|
||||
foreach a : cc.get_supported_function_attributes(_attributes)
|
||||
pre_args += '-DHAVE_FUNC_ATTRIBUTE_@0@'.format(a.to_upper())
|
||||
|
Reference in New Issue
Block a user