From f9dcbd53e7c63918b4798d961b56d28e55c9787f Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Mon, 17 Oct 2022 10:25:25 -0700 Subject: WriteAST1180SOC: Add _X_UNUSED attribute to temp variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clears 67 out of 84 warnings of the form: In file included from ast_cursor.c:53:0: ast_cursor.c: In function ‘ASTLoadCursorImage’: ast_vgatool.h:149:15: warning: variable ‘temp’ set but not used [-Wunused-but-set-variable] ULONG temp; \ ^ ast_cursor.c:293:9: note: in expansion of macro ‘WriteAST1180SOC’ WriteAST1180SOC(AST1180_GFX_BASE+AST1180_HWC1_PATTERNADDR, ulPatternAddr); ^~~~~~~~~~~~~~~ Signed-off-by: Alan Coopersmith --- src/ast_vgatool.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/ast_vgatool.h b/src/ast_vgatool.h index 6d24263..f9b65ba 100644 --- a/src/ast_vgatool.h +++ b/src/ast_vgatool.h @@ -146,7 +146,7 @@ #define WriteAST1180SOC(addr, data) \ { \ - ULONG temp; \ + ULONG temp _X_UNUSED; \ *(ULONG *) (pAST->MMIOVirtualAddr + 0xF004) = (addr) & 0xFFFF0000; \ *(ULONG *) (pAST->MMIOVirtualAddr + 0xF000) = 0x1; \ *(ULONG *) (pAST->MMIOVirtualAddr + 0x10000 + ((addr) & 0x0000FFFF)) = (data); \ -- cgit v1.2.3