[PATCH] let sparse warn on &inline_function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Let sparse warn, if we take pointers to inline functions.

Signed-off-by: Michael Buesch <mb@xxxxxxxxx>

diff --git a/evaluate.c b/evaluate.c
index 2c70cee..1cf562f 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -1297,6 +1297,8 @@ static struct symbol *create_pointer(str
 		warning(expr->pos, "taking address of 'register' variable '%s'", show_ident(sym->ident));
 		sym->ctype.modifiers &= ~MOD_REGISTER;
 	}
+	if (sym->ctype.modifiers & MOD_INLINE)
+		warning(expr->pos, "taking address of 'inline' function '%s'", show_ident(sym->ident));
 	if (sym->type == SYM_NODE) {
 		ptr->ctype.as |= sym->ctype.as;
 		ptr->ctype.modifiers |= sym->ctype.modifiers & MOD_PTRINHERIT;
-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux