From 3a648372394c72632f9916ccf461d32c63c805ad Mon Sep 17 00:00:00 2001 From: Jeroen Ooms Date: Mon, 4 Dec 2023 14:04:46 +0100 Subject: [PATCH] Fix some printf warnings for CRAN --- DESCRIPTION | 2 +- NEWS.md | 4 ++++ src/db-apply.c | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 8d48683..d473c6d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: RMySQL -Version: 0.10.26 +Version: 0.10.27 Title: Database Interface and 'MySQL' Driver for R Description: Legacy 'DBI' interface to 'MySQL' / 'MariaDB' based on old code ported from S-PLUS. A modern 'MySQL' client written in 'C++' is available diff --git a/NEWS.md b/NEWS.md index 34922fa..e704c2d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# Version 0.10.27 + + * Fix some printf warnings for CRAN + # Version 0.10.26 * Windows: update libs with arm support diff --git a/src/db-apply.c b/src/db-apply.c index e94ea35..6672aee 100644 --- a/src/db-apply.c +++ b/src/db-apply.c @@ -268,7 +268,7 @@ SEXP /* output is a named list */ SET_LST_CHR_EL(data,j,i,NA_STRING); else { if((size_t) lens[j] != strlen(row[j])){ - warning("internal error: row %ld field %ld truncated", i, j); + warning("internal error: row %d field %d truncated", i, j); } SET_LST_CHR_EL(data,j,i,mkChar(row[j])); } @@ -377,7 +377,7 @@ SEXP /* output is a named list */ (void) strcat(buf, "output group was computed with partial data. "); (void) strcat(buf, "The remaining data were left un-read in the "); (void) strcat(buf, "result set."); - warning(buf); + warning("%s", buf); } }