summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2022-05-19 15:55:40 -0400
committerPeter Jones <pjones@redhat.com>2022-05-23 16:49:53 -0400
commitaa61fdf490d16aaa23de0cbe5e9f16d3bc72e582 (patch)
tree8270743b0a5aa20694810a98214aee26f837c8b1 /include
parent759f061e46b4b9b9b74626ad8bb566c49e12e5c1 (diff)
downloadefi-boot-shim-aa61fdf490d16aaa23de0cbe5e9f16d3bc72e582.tar.gz
efi-boot-shim-aa61fdf490d16aaa23de0cbe5e9f16d3bc72e582.zip
Give the Coverity scanner some more GCC blinders...
Coverity complains: CID 373676 (#3 of 3): Unrecoverable parse warning (PARSE_ERROR) 1. arguments_provided_for_attribute: attribute "__malloc__" does not take arguments This is, of course, just plain wrong. Even so, I'm tired of looking at it, so this patch wraps the #define we use for that attribute in a check to see if it's being built by Coverity. Signed-off-by: Peter Jones <pjones@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/compiler.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/compiler.h b/include/compiler.h
index 18576724..b4bf1031 100644
--- a/include/compiler.h
+++ b/include/compiler.h
@@ -47,8 +47,12 @@
#define ALIAS(x) __attribute__((weak, alias (#x)))
#endif
#ifndef ALLOCFUNC
+#if defined(__COVERITY__)
+#define ALLOCFUNC(a, b)
+#else
#define ALLOCFUNC(dealloc, dealloc_arg) __attribute__((__malloc__(dealloc, dealloc_arg)))
#endif
+#endif
#ifndef PRINTF
#define PRINTF(first, args...) __attribute__((__format__(printf, first, ## args)))
#endif