9316 ldap: comparison between pointer and zero character constant

Review Request #979 — Created March 19, 2018 and submitted — Latest diff uploaded

tsoome
illumos-gate
9316
f503d74...
general
../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


Loading...