H3Index.c uses sprintf, but this won't pass R Checks (as of R 4.3)
checking compiled code ... WARNING
File ‘h3lib/libs/h3lib.so’:
Found ‘_sprintf’, possibly from ‘sprintf’ (C)
Object: ‘h3Index.o’
Compiled code should not call entry points which might terminate R nor
write to stdout/stderr instead of to the console, nor use Fortran I/O
nor system RNGs nor [v]sprintf.
Reference - https://www.tidyverse.org/blog/2023/03/cran-checks-compiled-code/#warning-regarding-the-use-of-codesprintfcode-in-cc
The solution is to use snprintf()
But this means we need to update the H3 source code directly.
H3Index.cusessprintf, but this won't pass R Checks (as of R 4.3)Reference - https://www.tidyverse.org/blog/2023/03/cran-checks-compiled-code/#warning-regarding-the-use-of-codesprintfcode-in-cc
The solution is to use
snprintf()But this means we need to update the
H3source code directly.