aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Makefile
diff options
authorRamsay Jones <ramsay@ramsayjones.plus.com>2017-07-19 21:05:18 +0100
committerChristopher Li <sparse@chrisli.org>2017-08-09 21:56:31 -0400
commit2927c4a4f9b1e8f439679f8741b0411c0f22b419 (patch)
treeb67eb1840b7852e0d049c5402b73dc3c3f8b2daa /Makefile
parentb1bcf2a5b9f43450bcb6055374c258c9de988502 (diff)
downloadsparse-dev-2927c4a4f9b1e8f439679f8741b0411c0f22b419.tar.gz
lib: workaround the 'redeclared with different type' errors
The 'selfcheck' make target issues sparse errors for function symbols 'error_die' and 'die', like so: CHECK lib.c lib.c:194:6: error: symbol 'error_die' redeclared with different type \ (originally declared at lib.h:98) - different modifiers lib.c:203:6: error: symbol 'die' redeclared with different type \ (originally declared at lib.h:94) - different modifiers This is caused by the 'noreturn' attribute being treated similar to a type qualifier and insisting that, not only the declaration and the definition of the function have the 'noreturn', but that they have the attribute in the same position. In order to suppress the error, move the attribute(s) to the beginning of the declaration, in the header file, and add an 'noreturn' attribute at the beginning of the definition (in lib.c). Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Christopher Li <sparse@chrisli.org>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions