janstarke / rexgen

API Documentation
https://github.com/janstarke/rexgen/blob/master/doc/api.md
GNU General Public License v2.0
52 stars 20 forks source link

./install build warning, " ‘strnlen’; did you mean ‘strlen’? " #53

Closed capsicumw closed 5 years ago

capsicumw commented 7 years ago

Not sure if this is a bug or not, rexgen seems to work, at least after finding a workaround for an [unrelated?] issue with the program relying on LD_LIBRARY_PATH to find /usr/local/lib/librexgen.so*

This is the clip from the ./install output

Scanning dependencies of target rexgen
[ 96%] Building C object rexgen/CMakeFiles/rexgen.dir/rexgen.c.o
/home/git/rexgen/src/rexgen/rexgen.c: In function ‘callback’:
/home/git/rexgen/src/rexgen/rexgen.c:160:11: warning: implicit declaration of function ‘strnlen’; did you mean ‘strlen’? [-Wimplicit-function-declaration]
     len = strnlen(dst, buffer_size);
           ^~~~~~~
           strlen
rjzak commented 6 years ago

I'm confused by this as well. The code correctly includes string.h, which has strnlen(). Yet this warning is thrown.