From: Danylo Piliaiev Date: Tue, 10 Mar 2020 14:24:59 +0000 (+0200) Subject: intel/tools: Fix compilation with UBSan X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=10eee6d8c630a346cb7d531263f69151016946d6;p=mesa.git 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: --- diff --git a/src/intel/tools/aub_read.c b/src/intel/tools/aub_read.c index a98e2c38180..6196817e9ea 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