commit f7e8f6751739ba47f952da6eb4b2afdb84f77bec
parent cf289428c7903b8f6473771fc2da27202cd6c948
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date: Wed, 28 Oct 2015 16:54:20 +0100
Fix VC2015 Warnings about declaration hiding another declaration
C4456, C4459
Diffstat:
5 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/src/test_dynamic_array.c b/src/test_dynamic_array.c
@@ -47,7 +47,6 @@ const char* strs[] = {
\n\
ABJ, VG'F BA GB GUR SVANY PUNCGRE BS QBBZ! -- VASREAB."
};
-const size_t nstrs = sizeof(strs)/sizeof(const char*);
#if 0
static void
@@ -55,6 +54,7 @@ test_primitive_type(void)
{
struct mem_allocator allocator_proxy;
struct darray_str darray;
+ const size_t nstrs = sizeof(strs)/sizeof(const char*);
size_t i = 0;
mem_init_proxy_allocator(&allocator_proxy, &mem_default_allocator);
diff --git a/src/test_float22.c b/src/test_float22.c
@@ -21,17 +21,17 @@
{ \
const float* a__ = (A); \
const float* b__ = (B); \
- int i; \
- FOR_EACH(i, 0, 2) \
- CHECK(a__[i], b__[i]); \
+ int i__; \
+ FOR_EACH(i__, 0, 2) \
+ CHECK(a__[i__], b__[i__]); \
} (void)0
#define CHECK_F22(A, B) \
{ \
const float* a__ = (A); \
const float* b__ = (B); \
- int i; \
- FOR_EACH(i, 0, 4) \
- CHECK(a__[i], b__[i]); \
+ int i__; \
+ FOR_EACH(i__, 0, 4) \
+ CHECK(a__[i__], b__[i__]); \
} (void)0
int
diff --git a/src/test_float33.c b/src/test_float33.c
@@ -21,17 +21,17 @@
{ \
const float* a__ = (A); \
const float* b__ = (B); \
- int i; \
- FOR_EACH(i, 0, 3) \
- CHECK(a__[i], b__[i]); \
+ int i__; \
+ FOR_EACH(i__, 0, 3) \
+ CHECK(a__[i__], b__[i__]); \
} (void)0
#define CHECK_F33(A, B) \
{ \
const float* a__ = (A); \
const float* b__ = (B); \
- int i; \
- FOR_EACH(i, 0, 9) \
- CHECK(a__[i], b__[i]); \
+ int i__; \
+ FOR_EACH(i__, 0, 9) \
+ CHECK(a__[i__], b__[i__]); \
} (void)0
int
diff --git a/src/test_float44.c b/src/test_float44.c
@@ -21,17 +21,17 @@
{ \
const float* a__ = (A); \
const float* b__ = (B); \
- int i; \
- FOR_EACH(i, 0, 4) \
- CHECK(a__[i], b__[i]); \
+ int i__; \
+ FOR_EACH(i__, 0, 4) \
+ CHECK(a__[i__], b__[i__]); \
} (void)0
#define CHECK_F44(A, B) \
{ \
const float* a__ = (A); \
const float* b__ = (B); \
- int i; \
- FOR_EACH(i, 0, 16) \
- CHECK(a__[i], b__[i]); \
+ int i__; \
+ FOR_EACH(i__, 0, 16) \
+ CHECK(a__[i__], b__[i__]); \
} (void)0
int
diff --git a/src/test_free_list.c b/src/test_free_list.c
@@ -57,9 +57,9 @@ main(int argc, char** argv)
FOR_EACH(i, 0, NB_OBJ * 2 / 3) {
const float rand_f /* in [0, 1] */ = (float)rand() / (float)RAND_MAX;
- const int i = (int)(rand_f * (NB_OBJ - 1));
- flist_object_del(&list, id[i]);
- id[i] = FID_NULL;
+ const int ii = (int)(rand_f * (NB_OBJ - 1));
+ flist_object_del(&list, id[ii]);
+ id[ii] = FID_NULL;
}
FOR_EACH(i, NB_OBJ / 2, NB_OBJ) {