diff --git a/examples/stl_write_file.c b/examples/stl_write_file.c index 96530f3..61fd73b 100644 --- a/examples/stl_write_file.c +++ b/examples/stl_write_file.c @@ -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); } diff --git a/src/gmio_core/internal/c99_stdio_compat.h b/src/gmio_core/internal/c99_stdio_compat.h index 5df965f..450c794 100644 --- a/src/gmio_core/internal/c99_stdio_compat.h +++ b/src/gmio_core/internal/c99_stdio_compat.h @@ -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 diff --git a/src/gmio_core/internal/eblake_str_two_way.h b/src/gmio_core/internal/eblake_str_two_way.h index 2311aaf..c081958 100644 --- a/src/gmio_core/internal/eblake_str_two_way.h +++ b/src/gmio_core/internal/eblake_str_two_way.h @@ -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 diff --git a/tests/test_core_internal.c b/tests/test_core_internal.c index 6b3d899..3045002 100644 --- a/tests/test_core_internal.c +++ b/tests/test_core_internal.c @@ -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)); }