summaryrefslogtreecommitdiffstats
path: root/module/lua/ldebug.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2019-12-16 15:53:43 -0800
committerBrian Behlendorf <[email protected]>2019-12-18 17:25:42 -0800
commit487bddad67f5abf4f4d8020befd5792743ff8657 (patch)
tree3b7345ae6759cc69c90df2b9541112bbe12647c3 /module/lua/ldebug.c
parent1e49b288cbb2ffa14b0031d8db77beef6e01974a (diff)
cppcheck: (error) Address of local auto-variable assigned
Suppress autoVariables warnings in the lua interpreter. The usage here while unconventional in intentional and the same as upstream. [module/lua/ldebug.c:327]: (error) Address of local auto-variable assigned to a function parameter. Reviewed-by: Tony Hutter <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #9732
Diffstat (limited to 'module/lua/ldebug.c')
-rw-r--r--module/lua/ldebug.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/module/lua/ldebug.c b/module/lua/ldebug.c
index 15fe91b0b..32bb908cd 100644
--- a/module/lua/ldebug.c
+++ b/module/lua/ldebug.c
@@ -324,6 +324,7 @@ static void kname (Proto *p, int pc, int c, const char **name) {
if (ISK(c)) { /* is 'c' a constant? */
TValue *kvalue = &p->k[INDEXK(c)];
if (ttisstring(kvalue)) { /* literal constant? */
+ // cppcheck-suppress autoVariables
*name = svalue(kvalue); /* it is its own name */
return;
}