From 10eee6d8c630a346cb7d531263f69151016946d6 Mon Sep 17 00:00:00 2001 From: Danylo Piliaiev Date: Tue, 10 Mar 2020 16:24:59 +0200 Subject: [PATCH] intel/tools: Fix compilation with UBSan Compilation failed with several similar errors: ../src/intel/tools/aub_read.c:322:4: error: case label does not reduce to an integer constant 322 | case MAKE_HEADER(TYPE_AUB, OPCODE_AUB, SUBOPCODE_HEADER): Signed-off-by: Danylo Piliaiev Reviewed-by: Lionel Landwerlin Tested-by: Marge Bot Part-of: --- src/intel/tools/aub_read.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/tools/aub_read.c b/src/intel/tools/aub_read.c index a98e2c3..6196817 100644 --- a/src/intel/tools/aub_read.c +++ b/src/intel/tools/aub_read.c @@ -39,7 +39,7 @@ #define SUBOPCODE(dw) (((dw) >> 16) & 0x7f) #define MAKE_HEADER(type, opcode, subopcode) \ - (((type) << 29) | ((opcode) << 23) | ((subopcode) << 16)) + ((((unsigned) (type)) << 29) | ((opcode) << 23) | ((subopcode) << 16)) #define TYPE_AUB 0x7 -- 2.7.4