• Rob Herring's avatar
    Android: enable noreturn and returns_nonnull attributes · 20d37da5
    Rob Herring authored
    Commit 94ca8e04 ("spirv: Add vtn_fail and vtn_assert helpers") broke
    Android builds which have -Werror enabled with the following errors:
    
    external/mesa3d/src/compiler/spirv/spirv_to_nir.c:272:1: error: control may reach end of non-void function [-Werror,-Wreturn-type]
    external/mesa3d/src/compiler/spirv/spirv_to_nir.c:810:1: error: control may reach end of non-void function [-Werror,-Wreturn-type]
    ...
    
    The problem is the noreturn attribute is not enabled and we to define
    HAVE_FUNC_ATTRIBUTE_NORETURN.
    
    Auditing src/util/macros.h, we're also missing
    HAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL and HAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT,
    so add them too.
    
    Fixes: 94ca8e04 ("spirv: Add vtn_fail and vtn_assert helpers")
    Cc: Jason Ekstrand <jason.ekstrand@intel.com>
    Reviewed-by: Jason Ekstrand's avatarJason Ekstrand <jason@jlekstrand.net>
    Reviewed-by: default avatarEmil Velikov <emil.velikov@collabora.com>
    Signed-off-by: Rob Herring's avatarRob Herring <robh@kernel.org>
    20d37da5
Name
Last commit
Last update
bin Loading commit data...
build-support Loading commit data...
docs Loading commit data...
doxygen Loading commit data...
include Loading commit data...
m4 Loading commit data...
scons Loading commit data...
scripts Loading commit data...
src Loading commit data...
.dir-locals.el Loading commit data...
.editorconfig Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
Android.common.mk Loading commit data...
Android.mk Loading commit data...
CleanSpec.mk Loading commit data...
Makefile.am Loading commit data...
REVIEWERS Loading commit data...
SConstruct Loading commit data...
VERSION Loading commit data...
appveyor.yml Loading commit data...
autogen.sh Loading commit data...
common.py Loading commit data...
configure.ac Loading commit data...
install-gallium-links.mk Loading commit data...
install-lib-links.mk Loading commit data...
meson.build Loading commit data...
meson_options.txt Loading commit data...