kbroman / qtl

R/qtl: A QTL mapping environment
https://rqtl.org
GNU General Public License v3.0
77 stars 45 forks source link

Additional warnings on CRAN #105

Closed kbroman closed 9 months ago

kbroman commented 9 months ago

Submitted new package version and got the following compiler warnings:

clang++-17  -std=gnu++17 -I"/home/hornik/tmp/R/include" -DNDEBUG   -I/usr/local/include -DUSE_TYPE_CHECKING_STRICT -D_FORTIFY_SOURCE=3   -fpic  -g -O3 -Wall -pedantic -c mqmdatatypes.cpp -o mqmdatatypes.o
mqmdatatypes.cpp:199:14: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  199 |     Rf_error(s);
      |              ^
mqmdatatypes.cpp:199:14: note: treat the string as an argument to avoid this
  199 |     Rf_error(s);
      |              ^
      |              "%s", 
mqmdatatypes.cpp:202:61: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
  202 |   void info(const char* s, ...){ Rprintf("INFO: "); Rprintf(s); Rprintf("\n"); }
      |                                                             ^
mqmdatatypes.cpp:202:61: note: treat the string as an argument to avoid this
  202 |   void info(const char* s, ...){ Rprintf("INFO: "); Rprintf(s); Rprintf("\n"); }
      |                                                             ^
      |                                                             "%s", 
2 warnings generated.