commit a6a03201f1917757ccb0b321d993bf3b6886ce77
parent dee28d7a2c3ced5958ac54a9957a6e07526ff66e
Author: vaplv <vaplv@free.fr>
Date: Wed, 20 Jul 2016 11:18:30 +0200
Fix warnings on the CL compiler
Diffstat:
4 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/src/test_hash_table.c b/src/test_hash_table.c
@@ -129,7 +129,7 @@ test_htbl_str_int(void)
const int array_size = (int)(sizeof(array) / sizeof(int));
struct str tmp;
int i = 0;
- int * data = NULL;
+ int* data = NULL;
STATIC_ASSERT
(sizeof(str)/sizeof(const char*) >= sizeof(array)/sizeof(int),
Unexpected_array_size);
@@ -399,7 +399,6 @@ ANGVBA BS QRZBAF EHA NZBX VA BHE PVGVRF.",
CHECK(htable_str_darray_size_get(&htbl3), nstrs);
FOR_EACH(i, 0, nstrs) {
- struct darray_char* data;
str_set(&tmp, str[i]);
data = htable_str_darray_find(&htbl, &tmp);
@@ -435,7 +434,6 @@ ANGVBA BS QRZBAF EHA NZBX VA BHE PVGVRF.",
CHECK(htable_str_darray_size_get(&htbl), nstrs - nerase);
FOR_EACH(j, 0, nerase) {
- struct darray_char* data;
str_set(&tmp, str[buf[j]]);
data = htable_str_darray_find(&htbl, &tmp);
@@ -477,7 +475,6 @@ ANGVBA BS QRZBAF EHA NZBX VA BHE PVGVRF.",
htable_str_darray_copy_and_release(&htbl, &htbl3);
FOR_EACH(i, 0, nstrs) {
- struct darray_char* data;
str_set(&tmp, str[i]);
data = htable_str_darray_find(&htbl, &tmp);
diff --git a/src/test_real2.h b/src/test_real2.h
@@ -95,10 +95,10 @@ main(int argc, char** argv)
CHECK(REALX_FUNC__(eq)(a, REALX_CTOR__(c, a[0], b[1])), 0);
REALX_FUNC__(set)(b, a);
- REALX_FUNC__(add)(b, b, REALX_FUNC__(splat)(c, REAL_EPSILON__ * 0.5));
+ REALX_FUNC__(add)(b, b, REALX_FUNC__(splat)(c, (REAL)(REAL_EPSILON__ * 0.5)));
CHECK(REALX_FUNC__(eq)(a, b), 0);
CHECK(REALX_FUNC__(eq_eps)(a, b, REAL_EPSILON__), 1);
- CHECK(REALX_FUNC__(eq_eps)(a, b, REAL_EPSILON__ * 0.25), 0);
+ CHECK(REALX_FUNC__(eq_eps)(a, b, (REAL)(REAL_EPSILON__ * 0.25)), 0);
REALX_FUNC__(set)(a, REALX_CTOR__(c, 1.0, -2.0));
REALX_FUNC__(set)(b, REALX_CTOR__(c, 3.0, 1.0));
diff --git a/src/test_real3.h b/src/test_real3.h
@@ -104,10 +104,10 @@ main(int argc, char** argv)
CHECK(REALX_FUNC__(eq)(a, REALX_CTOR__(c, a[0], a[1], b[2])), 0);
REALX_FUNC__(set)(b, a);
- REALX_FUNC__(add)(b, b, REALX_FUNC__(splat)(c, REAL_EPSILON__ * 0.5));
+ REALX_FUNC__(add)(b, b, REALX_FUNC__(splat)(c, (REAL)(REAL_EPSILON__ * 0.5)));
CHECK(REALX_FUNC__(eq)(a, b), 0);
CHECK(REALX_FUNC__(eq_eps)(a, b, REAL_EPSILON__), 1);
- CHECK(REALX_FUNC__(eq_eps)(a, b, REAL_EPSILON__ * 0.25), 0);
+ CHECK(REALX_FUNC__(eq_eps)(a, b, (REAL)(REAL_EPSILON__ * 0.25)), 0);
REALX_FUNC__(set)(a, REALX_CTOR__(c, 1.0, -2.0, 2.0));
REALX_FUNC__(set)(b, REALX_CTOR__(c, 3.0, 1.0, -1.5));
CHECK_REAL3(REALX_FUNC__(cross)(dst, a, b), REALX_CTOR__(c, 1.0, 7.5, 7.0));
diff --git a/src/test_real4.h b/src/test_real4.h
@@ -114,10 +114,10 @@ main(int argc, char** argv)
CHECK(REALX_FUNC__(eq)(a, REALX_CTOR__(c, a[0], a[1], a[2], b[3])), 0);
REALX_FUNC__(set)(b, a);
- REALX_FUNC__(add)(b, b, REALX_FUNC__(splat)(c, REAL_EPSILON__ * 0.5));
+ REALX_FUNC__(add)(b, b, REALX_FUNC__(splat)(c, (REAL)(REAL_EPSILON__ * 0.5)));
CHECK(REALX_FUNC__(eq)(a, b), 0);
CHECK(REALX_FUNC__(eq_eps)(a, b, REAL_EPSILON__), 1);
- CHECK(REALX_FUNC__(eq_eps)(a, b, REAL_EPSILON__ * 0.25), 0);
+ CHECK(REALX_FUNC__(eq_eps)(a, b, (REAL)(REAL_EPSILON__ * 0.25)), 0);
REALX_FUNC__(set)(a, REALX_CTOR__(c, 1.0, 3.0, -2.0, (REAL)0.1));
REALX_FUNC__(set)(b, REALX_CTOR__(c, -1.0, (REAL)3.1, (REAL)-2.1, 1.0));