From 19af345818f50162848db3a2a8310586f8c2a9b0 Mon Sep 17 00:00:00 2001 From: Xiuwen Zheng Date: Fri, 19 Jan 2024 19:58:00 -0600 Subject: [PATCH] fix -Wformat-security --- DESCRIPTION | 4 ++-- NEWS | 8 ++++++++ src/ConvToGDS.cpp | 2 +- src/genPCA.cpp | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index ba8bbed..86fc8cd 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,8 +2,8 @@ Package: SNPRelate Type: Package Title: Parallel Computing Toolset for Relatedness and Principal Component Analysis of SNP Data -Version: 1.36.0 -Date: 2023-10-26 +Version: 1.36.1 +Date: 2024-01-19 Depends: R (>= 2.15), gdsfmt (>= 1.8.3) LinkingTo: gdsfmt Imports: methods diff --git a/NEWS b/NEWS index 3c48323..f273672 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,11 @@ +CHANGES IN VERSION 1.36.1 +------------------------- + +UTILITIES + + o fix the compiler warning: -Wformat-security + + CHANGES IN VERSION 1.34.0 ------------------------- diff --git a/src/ConvToGDS.cpp b/src/ConvToGDS.cpp index 5e707c2..a39ada9 100755 --- a/src/ConvToGDS.cpp +++ b/src/ConvToGDS.cpp @@ -273,7 +273,7 @@ class COREARRAY_DLL_LOCAL CReadLine GDS_SetError(buf); \ has_error = true; \ }); \ - if (has_error) error(GDS_GetError()); \ + if (has_error) Rf_error("%s", GDS_GetError()); \ return rv_ans; diff --git a/src/genPCA.cpp b/src/genPCA.cpp index c5ed9c4..71e5f74 100755 --- a/src/genPCA.cpp +++ b/src/genPCA.cpp @@ -745,7 +745,7 @@ class COREARRAY_DLL_LOCAL CRandomPCA if (verbose) { Rprintf("%s Begin projecting genotypes and SVD (%d x %d)\n", - TimeToStr(), hsize, nSNP); + TimeToStr(), (int)hsize, (int)nSNP); } // SVD MatH, get vt stored in MatH