r-lib / svglite

A lightweight svg graphics device for R
https://svglite.r-lib.org
180 stars 39 forks source link

Pedantic warning #44

Closed jeroen closed 9 years ago

jeroen commented 9 years ago
g++ -I/usr/share/R/include -DNDEBUG -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -I../inst/include/  -I"/usr/local/lib/R/site-library/Rcpp/include"   -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -O3 -Wall -pipe -Wno-unused -pedantic -c raster_to_base64.cpp -o raster_to_base64.o
raster_to_base64.cpp: In function ‘std::vector<unsigned int> convert_hex(std::vector<std::basic_string<char> >)’:
raster_to_base64.cpp:136:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for( int i = 0 ; i < hcode.size() ; i++ ){
                                   ^
davidgohel commented 9 years ago

@hadley i will make a pr.

davidgohel commented 9 years ago

It's not in svglite but in gdtools. @jeroenooms is there any flag to use that enable reproducing this issue, I think it's fixed but don't know how to test.

jeroen commented 9 years ago

I only saw this on Ubuntu, not very important. Im quite sure the size_t fixed it. Thanks!