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 <danylo.piliaiev@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4132>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4132>
This commit is contained in:
Danylo Piliaiev 2020-03-10 16:24:59 +02:00 committed by Marge Bot
parent 74be835a84
commit 10eee6d8c6
1 changed files with 1 additions and 1 deletions

View File

@ -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