From 3e2245c4549a1498a451675007b85761c57ccc38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20=C5=9Alusarz?= Date: Wed, 28 Oct 2020 17:08:54 +0100 Subject: [PATCH] intel/tools: fix invalid type in argument to printf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit $2 is exp2, exp2 is defined to be llint and llint is defined to be unsigned long long int. Fixes error reported by Coverity: CID 1451141: Invalid type in argument to printf format specifier (PRINTF_ARGS) Fixes: 70308a5a8a8 ("intel/tools: New i965 instruction assembler tool") Signed-off-by: Marcin Ĺšlusarz Reviewed-by: Adam Jackson Reviewed-by: Lionel Landwerlin Part-of: (cherry picked from commit e96f33cd30087016162b99ee0e1e127e7d3abd63) --- .pick_status.json | 2 +- src/intel/tools/i965_gram.y | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index bd3c51213d6..47e80221792 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -850,7 +850,7 @@ "description": "intel/tools: fix invalid type in argument to printf", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "70308a5a8a801a960bb9f45fb597f80b77c51014" }, diff --git a/src/intel/tools/i965_gram.y b/src/intel/tools/i965_gram.y index 2b657688e25..c98f147959e 100644 --- a/src/intel/tools/i965_gram.y +++ b/src/intel/tools/i965_gram.y @@ -2185,7 +2185,7 @@ execsize: | LPAREN exp2 RPAREN { if ($2 > 32 || !isPowerofTwo($2)) - error(&@2, "Invalid execution size %d\n", $2); + error(&@2, "Invalid execution size %llu\n", $2); $$ = cvt($2) - 1; }