[R-pkg-devel] spurious rchk warning

Patrick Perry pperry at stern.nyu.edu
Tue Nov 21 03:34:19 CET 2017


One of my packages has what I believe to be spurious rchk warnings:

 From 
https://raw.githubusercontent.com/kalibera/cran-checks/master/rchk/results/utf8.out

Package utf8 version 1.1.0
Package built using 73757/R 3.5.0; x86_64-pc-linux-gnu; 2017-11-20 22:02:23 UTC; unix
Checked with rchk version 63f79d910f5835174fcaa5a0a7d2409348f7d2ac
More information at https://github.com/kalibera/cran-checks/blob/master/rchk/PROTECT.md

Function rutf8_as_utf8
   [UP] unprotected variable ans while calling allocating function R_CheckUserInterrupt utf8/src/as_utf8.c:68
   [UP] unprotected variable ans while calling allocating function rutf8_translate_utf8 utf8/src/as_utf8.c:83
   [UP] unprotected variable ans while calling allocating function Rf_mkCharLenCE utf8/src/as_utf8.c:117

The offending function is at https://github.com/patperry/r-utf8/blob/master/src/as_utf8.c#L46

I tried to fix the warning in line 64 with

PROTECT(ans = sx); nprot++;

This did not work. Any suggestions?

Thanks,


Patrick



More information about the R-package-devel mailing list