From 571e9de2ac77d838ba47bb7ec6981c7a5b5e68d0 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Thu, 12 Jul 2018 11:42:25 +0200 Subject: [PATCH 1/2] Fix definition of snprintf for MSVC MS _snprintf_s takes an additional argument for the size of the buffer, so is not a direct replacement (utest/ctest.h from which I copied was wrong) --- driver/others/openblas_get_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver/others/openblas_get_config.c b/driver/others/openblas_get_config.c index ecafa16c4..3e87f2cc2 100644 --- a/driver/others/openblas_get_config.c +++ b/driver/others/openblas_get_config.c @@ -37,7 +37,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #if defined(_WIN32) && defined(_MSC_VER) #if _MSC_VER < 1900 -#define snprintf _snprintf_s +#define snprintf _snprintf #endif #endif From 1309711e243ee945908b0c6139e9ea35c12e97f1 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Thu, 12 Jul 2018 11:47:52 +0200 Subject: [PATCH 2/2] Fix declaration of snprintf for older MSVC _snprintf_s takes an additional (size) argument, so is no direct replacement. (Note that this code is currently unused - the two instances of snprintf here are within ifdef blocks that are not compiled for MSVC) --- utest/ctest.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utest/ctest.h b/utest/ctest.h index 1deea32f6..f297dafba 100644 --- a/utest/ctest.h +++ b/utest/ctest.h @@ -84,7 +84,7 @@ struct ctest { #endif #if _MSC_VER < 1900 -#define snprintf _snprintf_s +#define snprintf _snprintf #endif #ifndef __cplusplus