mirror of
https://github.com/samba-team/samba.git
synced 2025-01-27 14:04:05 +03:00
42e7671226
The env and endptr pointers need to be dereferenced, but that is not enough: we don't really want to regard an empty string (*env == '\0') as a valid number. Found by GCC 8.0.0 20170705 (experimental). [2095/4103] Compiling lib/nss_wrapper/nss_wrapper.c ../lib/nss_wrapper/nss_wrapper.c: In function "nwrap_init": ../lib/nss_wrapper/nss_wrapper.c:1571:13: warning: comparison between pointer and zero character constant [-Wpointer-compare] if (((env != '\0') && (endptr == '\0')) || ^~ ../lib/nss_wrapper/nss_wrapper.c:1571:9: note: did you mean to dereference the pointer? if (((env != '\0') && (endptr == '\0')) || ^ ../lib/nss_wrapper/nss_wrapper.c:1571:33: warning: comparison between pointer and zero character constant [-Wpointer-compare] if (((env != '\0') && (endptr == '\0')) || ^~ ../lib/nss_wrapper/nss_wrapper.c:1571:26: note: did you mean to dereference the pointer? if (((env != '\0') && (endptr == '\0')) || Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Thu Oct 19 16:42:17 CEST 2017 on sn-devel-144