Fix some warnings

This commit is contained in:
Hugues Delorme 2016-03-10 18:27:10 +01:00
parent 603adc474c
commit 8ea5125b4b
4 changed files with 7 additions and 4 deletions

View File

@ -28,9 +28,9 @@ static void my_3d_mesh__get_triangle(
struct gmio_stl_coords* tri_vertices = &triangle->v1;
int i;
for (i = 0; i < 3; ++i) {
tri_vertices[i].x = my_tri->vertex[i].coords[0];
tri_vertices[i].y = my_tri->vertex[i].coords[1];
tri_vertices[i].z = my_tri->vertex[i].coords[2];
tri_vertices[i].x = (float)my_tri->vertex[i].coords[0];
tri_vertices[i].y = (float)my_tri->vertex[i].coords[1];
tri_vertices[i].z = (float)my_tri->vertex[i].coords[2];
}
gmio_stl_triangle_compute_normal(triangle);
}

View File

@ -37,6 +37,7 @@
GMIO_INLINE int gmio_vsnprintf(
char* buf, size_t bufn, const char* fmt, va_list args)
{
GMIO_UNUSED(bufn);
return vsprintf(buf, fmt, args);
}
#endif

View File

@ -216,6 +216,7 @@ critical_factorization (const unsigned char *needle, size_t needle_len,
return max_suffix_rev + 1;
}
GMIO_PRAGMA_MSVC_WARNING_PUSH_AND_DISABLE(4706)
/* Return the first location of non-empty NEEDLE within HAYSTACK, or
NULL. HAYSTACK_LEN is the minimum known length of HAYSTACK. This
method is optimized for NEEDLE_LEN < LONG_NEEDLE_THRESHOLD.
@ -522,6 +523,7 @@ two_way_long_needle (const unsigned char *haystack, size_t haystack_len,
}
return NULL;
}
GMIO_PRAGMA_MSVC_WARNING_POP()
#undef AVAILABLE
#undef CANON_ELEMENT

View File

@ -274,7 +274,7 @@ const char* test_internal__string_utils()
UTEST_ASSERT(gmio_ascii_isspace('\n'));
UTEST_ASSERT(gmio_ascii_isspace('\r'));
for (c = 0; c >= 0 && c <= 127; ++c) {
for (c = 0; 0 <= c && c <= 127; ++c) {
if (65 <= c && c <= 90) {
UTEST_ASSERT(gmio_ascii_isupper(c));
}