From 54400097001de1c36f2059bcf82fe5dbd2aab242 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= Date: Sun, 18 Feb 2024 21:44:53 +0100 Subject: [PATCH 1/2] [cmake] Suppress useless Visual C security warnings --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f4239c32..063d5f78 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,6 +120,8 @@ endif() if(MSVC) add_compile_definitions(NOMINMAX _COMPLEX_DEFINED) + # suppress compiler warnings that sprintf and similar functions are unsafe (e.g. C4996) + add_compile_definitions(_CRT_SECURE_NO_WARNINGS) endif() ###################################################################### From 4a947f2237b8fa80b7903297a15aaf4ef90f2829 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= Date: Sun, 18 Feb 2024 21:59:16 +0100 Subject: [PATCH 2/2] [example] Fix a printf warning by Visual C --- EXAMPLE/dlinsol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EXAMPLE/dlinsol.c b/EXAMPLE/dlinsol.c index 8d579937..0fff29c6 100644 --- a/EXAMPLE/dlinsol.c +++ b/EXAMPLE/dlinsol.c @@ -76,7 +76,7 @@ int main(int argc, char *argv[]) dCreate_CompCol_Matrix(&A, m, n, nnz, a, asub, xa, SLU_NC, SLU_D, SLU_GE); Astore = A.Store; printf("Dimension %dx%d; # nonzeros %d\n", (int)A.nrow, (int)A.ncol, (int)Astore->nnz); - printf("sizeof(int_t) %lu\n", sizeof(int_t)); + printf("sizeof(int_t) %zu\n", sizeof(int_t)); nrhs = 1; if ( !(rhs = doubleMalloc(m * nrhs)) ) ABORT("Malloc fails for rhs[].");