Skip to content

Commit 5605cab

Browse files
committed
Fix: Type-casting warnings
1 parent 58297ca commit 5605cab

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

c/lib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ extern "C" {
9292
return; \
9393
} \
9494
} \
95-
metric(a, b, a_length, b_length, result); \
95+
metric(a, b, a_length, b_length, (void *)result); \
9696
}
9797

9898
#define SIMSIMD_DECLARATION_SPARSE_DOT(name, index_type, weight_type, output_type) \

scripts/test.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,8 +1169,8 @@ void test_atan2_quadrants(void) {
11691169
simsimd_f32_t result32 = simsimd_f32_atan2(y32, x32);
11701170
simsimd_f64_t diff32 = fabs((simsimd_f64_t)expected32 - (simsimd_f64_t)result32);
11711171
if (diff32 >= tolerance_f32) {
1172-
printf(" FAIL random f32 #%zu: y=%f, x=%f, expected=%f, got=%f, diff=%e\n", i, y32, x32, expected32,
1173-
result32, diff32);
1172+
printf(" FAIL random f32 #%llu: y=%f, x=%f, expected=%f, got=%f, diff=%e\n", (unsigned long long)i, y32,
1173+
x32, expected32, result32, diff32);
11741174
}
11751175
assert(diff32 < tolerance_f32);
11761176

@@ -1179,8 +1179,8 @@ void test_atan2_quadrants(void) {
11791179
simsimd_f64_t result64 = simsimd_f64_atan2(y, x);
11801180
simsimd_f64_t diff64 = fabs(expected64 - result64);
11811181
if (diff64 >= tolerance_f64) {
1182-
printf(" FAIL random f64 #%zu: y=%f, x=%f, expected=%f, got=%f, diff=%e\n", i, y, x, expected64, result64,
1183-
diff64);
1182+
printf(" FAIL random f64 #%llu: y=%f, x=%f, expected=%f, got=%f, diff=%e\n", (unsigned long long)i, y, x,
1183+
expected64, result64, diff64);
11841184
}
11851185
assert(diff64 < tolerance_f64);
11861186
}

0 commit comments

Comments
 (0)