Actions
Bug #9316
closedldap: comparison between pointer and zero character constant
Start date:
2018-03-19
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
Description
issues found by gcc 7 build:
../common/ldapsearch.c:243:44: error: comparison between pointer and zero character constant [-Werror=pointer-compare] } else if ( sortattr == NULL || *sortattr == '\0' || server_sort) { ^~ ../common/ldapsearch.c:243:34: note: did you mean to dereference the pointer? } else if ( sortattr == NULL || *sortattr == '\0' || server_sort) { ^ ../ns_ldap/ldapclient.c:2526:36: error: comparison between pointer and zero character constant [-Werror=pointer-compare] if (adminDN == NULL || adminDN[0] == '\0') { ^~ ../ns_ldap/ldapclient.c:2526:25: note: did you mean to dereference the pointer? if (adminDN == NULL || adminDN[0] == '\0') { ^ ../ns_ldap/ldapclient.c:2535:48: error: comparison between pointer and zero character constant [-Werror=pointer-compare] if (adminPassword == NULL || adminPassword[0] == '\0') { ^~ ../ns_ldap/ldapclient.c:2535:31: note: did you mean to dereference the pointer? if (adminPassword == NULL || adminPassword[0] == '\0') { ^ ../ns_ldap/ldapaddent.c:112:11: error: comparison between pointer and zero character constant [-Werror=pointer-compare] while (c != '\0' && *c == ' ') ^~ ../ns_ldap/ldapaddent.c:112:9: note: did you mean to dereference the pointer? while (c != '\0' && *c == ' ') ^ ../ns_ldap/ldapaddent.c: In function 'genent_aliases': ../ns_ldap/ldapaddent.c:2100:10: error: comparison between pointer and zero character constant [-Werror=pointer-compare] if (++t == '\0') { ^~ ../ns_ldap/ldapaddent.c:2100:6: note: did you mean to dereference the pointer? if (++t == '\0') { ^~ cc1: all warnings being treated as errors
Actions