aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/evaluate.c
diff options
authorJann Horn <jannh@google.com>2019-03-27 21:10:38 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2019-03-27 22:12:24 +0100
commit1ed0955919913ad4f314e867fcbc76535acf010c (patch)
treecf38b8d8908664d0b0c78b43a40b951e4d9b027d /evaluate.c
parent7fd3778e2d3a7b17aefea66819bf07feb7a257d3 (diff)
downloadsparse-dev-1ed0955919913ad4f314e867fcbc76535acf010c.tar.gz
evaluate: externally_visible functions don't need a declaration
sparse warns for non-static functions that don't have a separate declaration. The kernel contains several such functions that are marked as __attribute__((externally_visible)) to mark that they are called from assembly code. Assembly code doesn't need a header with a declaration to call a function. Therefore, suppress the warning for functions with __attribute__((externally_visible)). Signed-off-by: Jann Horn <jannh@google.com> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'evaluate.c')
-rw-r--r--evaluate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/evaluate.c b/evaluate.c
index cedd1330..7c63d788 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -3387,7 +3387,7 @@ void check_duplicates(struct symbol *sym)
}
if (!declared) {
unsigned long mod = sym->ctype.modifiers;
- if (mod & (MOD_STATIC | MOD_REGISTER))
+ if (mod & (MOD_STATIC | MOD_REGISTER | MOD_EXT_VISIBLE))
return;
if (!(mod & MOD_TOPLEVEL))
return;