Skip to content

Commit 87ff65b

Browse files
committed
[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.
1 parent 5953532 commit 87ff65b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mlir/test/CAPI/sparse_tensor.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "mlir-c/RegisterEverything.h"
1515

1616
#include <assert.h>
17+
#include <inttypes.h>
1718
#include <math.h>
1819
#include <stdio.h>
1920
#include <stdlib.h>
@@ -47,7 +48,7 @@ static int testRoundtripEncoding(MlirContext ctx) {
4748
malloc(sizeof(MlirSparseTensorLevelType) * lvlRank);
4849
for (int l = 0; l < lvlRank; ++l) {
4950
lvlTypes[l] = mlirSparseTensorEncodingAttrGetLvlType(originalAttr, l);
50-
fprintf(stderr, "level_type: %llu\n", lvlTypes[l]);
51+
fprintf(stderr, "level_type: %" PRIu64 "\n", lvlTypes[l]);
5152
}
5253
// CHECK: posWidth: 32
5354
int posWidth = mlirSparseTensorEncodingAttrGetPosWidth(originalAttr);

0 commit comments

Comments
 (0)