mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-18 10:21:01 +03:00
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 <hutter2@llnl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #9732
This commit is contained in:
parent
1c27877ab2
commit
180c41e0b7
@ -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;
|
||||
}
|
||||
|
@ -168,6 +168,7 @@ int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud) {
|
||||
struct lua_longjmp lj;
|
||||
lj.status = LUA_OK;
|
||||
lj.previous = L->errorJmp; /* chain new error handler */
|
||||
// cppcheck-suppress autoVariables
|
||||
L->errorJmp = &lj;
|
||||
LUAI_TRY(L, &lj,
|
||||
(*f)(L, ud);
|
||||
|
Loading…
Reference in New Issue
Block a user