mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +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
							
								
									1e49b288cb
								
							
						
					
					
						commit
						487bddad67
					
				| @ -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; | ||||
|     } | ||||
|  | ||||
| @ -176,6 +176,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
	 Brian Behlendorf
						Brian Behlendorf