From f895ea569785948c131beb68757df4b7ee28a045 Mon Sep 17 00:00:00 2001 From: Karl Broman Date: Mon, 27 Nov 2023 06:44:02 -0600 Subject: [PATCH 1/5] Fix CRAN warning (Issue #104) --- DESCRIPTION | 4 ++-- NEWS.md | 8 ++++++++ src/mqmaugment.cpp | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 3d641a16..78543084 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: qtl -Version: 1.62 -Date: 2023-11-17 +Version: 1.64 +Date: 2023-11-27 Title: Tools for Analyzing QTL Experiments Author: Karl W Broman and Hao Wu, with ideas from Gary Churchill and Saunak Sen and contributions from diff --git a/NEWS.md b/NEWS.md index 5dfd5ab0..46d17de7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,13 @@ # Revision history for the R/qtl package +## Version 1.64, 2023-11-27 + +### Bug fixes + +- Fixed problem in a call to Rprintf() in C++ code, identified by CRAN. + (Issue #104.) + + ## Version 1.62, 2023-11-17 ### Bug fixes diff --git a/src/mqmaugment.cpp b/src/mqmaugment.cpp index 26f599c3..840cb928 100644 --- a/src/mqmaugment.cpp +++ b/src/mqmaugment.cpp @@ -2,7 +2,7 @@ * * mqmaugment.cpp * - * Copyright (c) 1996-2011 by + * Copyright (c) 1996-2023 by * Ritsert C Jansen, Danny Arends, Pjotr Prins and Karl W Broman * * initial MQM C code written between 1996-2002 by Ritsert C. Jansen @@ -241,7 +241,7 @@ int mqmaugmentfull(MQMMarkerMatrix* markers,int* nind, int* augmentednind, ivect (*augmentednind)=(*augmentednind)+(numimputations*current_leftover_ind); (*nind)= (*nind)+(current_leftover_ind); debug_trace("nind:%d,naugmented:%d",(*nind)+(current_leftover_ind),(*augmentednind)+(current_leftover_ind)); - Rprintf("INFO: VALGRIND MEMORY DEBUG BARRIERE TRIGGERED\n", ""); + Rprintf("INFO: VALGRIND MEMORY DEBUG BARRIERE TRIGGERED\n"); }else{ if(ind_still_left && augment_strategy == 3){ if(verbose) Rprintf("INFO: Dropping %d individuals from further analysis\n",ind_still_left); From a8bd4c6f4207f9d2bda939d3eebfc5fed77995b3 Mon Sep 17 00:00:00 2001 From: Karl Broman Date: Mon, 27 Nov 2023 06:47:51 -0600 Subject: [PATCH 2/5] Update version in inst/INSTALL_ME.txt --- inst/INSTALL_ME.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/inst/INSTALL_ME.txt b/inst/INSTALL_ME.txt index 898833f7..ce47cb28 100644 --- a/inst/INSTALL_ME.txt +++ b/inst/INSTALL_ME.txt @@ -39,10 +39,10 @@ INSTALLATION OF R AND R/QTL (Windows) This will download the binary from CRAN and install it. - Alternatively, you can download the "qtl_1.62.zip" (or the + Alternatively, you can download the "qtl_1.64.zip" (or the equivalent). Then start R and select (on the menu bar) "Packages" and then "Install package from local zip file...". - Find the file "qtl_1.62.zip" on your hard drive, and click + Find the file "qtl_1.64.zip" on your hard drive, and click "Open". @@ -58,7 +58,7 @@ INSTALLATION OF R AND R/QTL (MacOS version 10.13 and above) This will download the binary from CRAN and install it. Alternatively, download the compiled version of R/qtl for - Mac OS X, a file like "qtl_1.62.tgz". Then start R and + Mac OS X, a file like "qtl_1.64.tgz". Then start R and select (on the menu bar) "Packages & Data" -> "Package Installer". Select "Local Binary Package" from the drop-down menu at the top of the window that comes up. Click "Install" @@ -78,19 +78,19 @@ INSTALLATION OF R/QTL (Unix) This will download the binary from CRAN and install it. Alternatively, download the R/qtl source code (a file like - "qtl_1.62.tar.gz"). Go into the directory containing the + "qtl_1.64.tar.gz"). Go into the directory containing the file and do one of the following: a. To install R/qtl in the standard location (/usr/local/lib/R/library), type - R CMD INSTALL qtl_1.62.tar.gz + R CMD INSTALL qtl_1.64.tar.gz You'll probably need to be superuser. b. To install the package locally, type - R CMD INSTALL --library=/home/auser/Rlibs qtl_1.62.tar.gz + R CMD INSTALL --library=/home/auser/Rlibs qtl_1.64.tar.gz (where "/home/auser/Rlibs" should be replaced with the appropriate directory). From 09b7ad6b535af3dc6ce146aba02ba2baf976f119 Mon Sep 17 00:00:00 2001 From: Karl Broman Date: Mon, 27 Nov 2023 08:13:44 -0600 Subject: [PATCH 3/5] Fix additional compiler warnings on CRAN (Issue #105) --- DESCRIPTION | 2 +- NEWS.md | 4 +++- src/mqmdatatypes.cpp | 7 +++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 78543084..089f3c83 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: qtl -Version: 1.64 +Version: 1.66 Date: 2023-11-27 Title: Tools for Analyzing QTL Experiments Author: Karl W Broman and Hao Wu, with diff --git a/NEWS.md b/NEWS.md index 46d17de7..295df834 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,12 +1,14 @@ # Revision history for the R/qtl package -## Version 1.64, 2023-11-27 +## Version 1.66, 2023-11-27 ### Bug fixes - Fixed problem in a call to Rprintf() in C++ code, identified by CRAN. (Issue #104.) +- Fixed additional compiler warnings on CRAN (Issue #105). + ## Version 1.62, 2023-11-17 diff --git a/src/mqmdatatypes.cpp b/src/mqmdatatypes.cpp index 86ef4f56..96a23794 100644 --- a/src/mqmdatatypes.cpp +++ b/src/mqmdatatypes.cpp @@ -196,8 +196,11 @@ void copyvector(vector vsource, vector vdestination, int dim) { #ifndef ENABLE_C99_MACROS void fatal(const char* s, ...){ - Rf_error(s); + Rprintf("%s", s); + Rf_error("Fatal error\n"); } void debug_trace(const char*, ...){} - void info(const char* s, ...){ Rprintf("INFO: "); Rprintf(s); Rprintf("\n"); } + void info(const char* s, ...){ + Rprintf("INFO: %s\n", s); + } #endif From bd872b289f6f9884372318ee2c45abf27a0de594 Mon Sep 17 00:00:00 2001 From: Karl Broman Date: Mon, 27 Nov 2023 08:14:34 -0600 Subject: [PATCH 4/5] github workflow: run checks on cran branch --- .github/workflows/R-CMD-check.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 5e180edd..23969572 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -2,9 +2,9 @@ # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: push: - branches: [main, master] + branches: [main, master, cran] pull_request: - branches: [main, master] + branches: [main, master, cran] name: R-CMD-check From b4985f4d4e535b5fe5d179c30453aa228495dc8a Mon Sep 17 00:00:00 2001 From: Karl Broman Date: Mon, 27 Nov 2023 08:15:27 -0600 Subject: [PATCH 5/5] revise version in INSTALL_ME, again --- inst/INSTALL_ME.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/inst/INSTALL_ME.txt b/inst/INSTALL_ME.txt index ce47cb28..67207aab 100644 --- a/inst/INSTALL_ME.txt +++ b/inst/INSTALL_ME.txt @@ -39,10 +39,10 @@ INSTALLATION OF R AND R/QTL (Windows) This will download the binary from CRAN and install it. - Alternatively, you can download the "qtl_1.64.zip" (or the + Alternatively, you can download the "qtl_1.66.zip" (or the equivalent). Then start R and select (on the menu bar) "Packages" and then "Install package from local zip file...". - Find the file "qtl_1.64.zip" on your hard drive, and click + Find the file "qtl_1.66.zip" on your hard drive, and click "Open". @@ -58,7 +58,7 @@ INSTALLATION OF R AND R/QTL (MacOS version 10.13 and above) This will download the binary from CRAN and install it. Alternatively, download the compiled version of R/qtl for - Mac OS X, a file like "qtl_1.64.tgz". Then start R and + Mac OS X, a file like "qtl_1.66.tgz". Then start R and select (on the menu bar) "Packages & Data" -> "Package Installer". Select "Local Binary Package" from the drop-down menu at the top of the window that comes up. Click "Install" @@ -78,19 +78,19 @@ INSTALLATION OF R/QTL (Unix) This will download the binary from CRAN and install it. Alternatively, download the R/qtl source code (a file like - "qtl_1.64.tar.gz"). Go into the directory containing the + "qtl_1.66.tar.gz"). Go into the directory containing the file and do one of the following: a. To install R/qtl in the standard location (/usr/local/lib/R/library), type - R CMD INSTALL qtl_1.64.tar.gz + R CMD INSTALL qtl_1.66.tar.gz You'll probably need to be superuser. b. To install the package locally, type - R CMD INSTALL --library=/home/auser/Rlibs qtl_1.64.tar.gz + R CMD INSTALL --library=/home/auser/Rlibs qtl_1.66.tar.gz (where "/home/auser/Rlibs" should be replaced with the appropriate directory).