nchan icon indicating copy to clipboard operation
nchan copied to clipboard

Failure to compile v1.2.7

Open dvershinin opened this issue 4 years ago • 3 comments

nchan-1.2.7/src/store/redis/rdsstore.c: In function 'redis_subscriber_unregister_send':
nchan-1.2.7/src/store/redis/rdsstore.c:83:15: error: the comparison will always evaluate as 'true' for the address of 'redis_subscriber_unregister_cb' will never be NULL [-Werror=address]
       if((cb) != NULL) {  

dvershinin avatar Mar 18 '20 09:03 dvershinin

FYI this only fails on CentOS 7 with the default GCC, version: 4.8.5. Build on CentOS 8 with newer GCC is unaffected.

dvershinin avatar Mar 18 '20 13:03 dvershinin

In objs/Makefile the -Werror flag is set, which is a compiler flag that causes all warnings to be treated as build errors. delete the -Werror flag, compile successfully with warnings

WinterChen avatar Jan 28 '21 09:01 WinterChen

@WinterChen well yeah, but the idea is having it compile cleanly without hacking the Makefiles. Some distros "require" this flag.

dvershinin avatar Jan 28 '21 20:01 dvershinin