$ CFLAGS="-fstack-protector-strong -O2" cmake . && make -j8
...
src/ngp_search.c: In function ‘get_file_name’:
cc1: error: function may return address of local variable [-Werror=return-local-addr]
src/ngp_search.c:60:10: note: declared here
char copy[FILENAME_MAX];
I'd also enable other warnings to see more potential issues
-pedantic-errors -pedantic -Wextra -Wall
For some weird reason it disables the local variable issue for me.
I'm using gcc 6.4.0 on Gentoo GNU/Linux.
Thank you!