mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 21:53:12 +08:00
[mlir][test] Fix -Wformat in sparse_tensor.c (NFC)
llvm-project/mlir/test/CAPI/sparse_tensor.c:50:43:
error: format specifies type 'unsigned long long' but the argument has type 'MlirSparseTensorLevelType' (aka 'unsigned long') [-Werror,-Wformat]
fprintf(stderr, "level_type: %llu\n", lvlTypes[l]);
~~~~ ^~~~~~~~~~~
%lu
1 error generated.
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include "mlir-c/RegisterEverything.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -47,7 +48,7 @@ static int testRoundtripEncoding(MlirContext ctx) {
|
||||
malloc(sizeof(MlirSparseTensorLevelType) * lvlRank);
|
||||
for (int l = 0; l < lvlRank; ++l) {
|
||||
lvlTypes[l] = mlirSparseTensorEncodingAttrGetLvlType(originalAttr, l);
|
||||
fprintf(stderr, "level_type: %llu\n", lvlTypes[l]);
|
||||
fprintf(stderr, "level_type: %" PRIu64 "\n", lvlTypes[l]);
|
||||
}
|
||||
// CHECK: posWidth: 32
|
||||
int posWidth = mlirSparseTensorEncodingAttrGetPosWidth(originalAttr);
|
||||
|
||||
Reference in New Issue
Block a user