9169 libsldap: comparison between pointer and zero character constant

Review Request #896 - Created Feb. 22, 2018 and submitted

Information
Toomas Soome
illumos-gate
9169
6ba0443...
Reviewers
general
../common/ns_crypt.c:101:19: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
   if (++anHexaStr != '\0') {
                   ^~
../common/ns_crypt.c:101:7: note: did you mean to dereference the pointer?
   if (++anHexaStr != '\0') {
       ^~

../common/ns_writes.c: In function '__s_cvt_hosts':
../common/ns_writes.c:2035:54: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
      ptr->h_addr_list == NULL || ptr->h_addr_list[0] == '\0') {
                                                      ^~
../common/ns_writes.c:2035:34: note: did you mean to dereference the pointer?
      ptr->h_addr_list == NULL || ptr->h_addr_list[0] == '\0') {
                                  ^
../common/ns_writes.c: In function '__s_cvt_services':
../common/ns_writes.c:2347:61: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
  if (ptr->s_name == NULL || ptr->s_port < 0 || ptr->s_proto == '\0') {
                                                             ^~
../common/ns_writes.c:2347:48: note: did you mean to dereference the pointer?
  if (ptr->s_name == NULL || ptr->s_port < 0 || ptr->s_proto == '\0') {
                                                ^
../common/ns_writes.c: In function '__s_cvt_netmasks':
../common/ns_writes.c:2561:19: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
  if (ptr->netmask != '\0') {
                   ^~
../common/ns_writes.c:2561:6: note: did you mean to dereference the pointer?
  if (ptr->netmask != '\0') {
      ^
../common/ns_writes.c: In function '__s_cvt_netgroups':
../common/ns_writes.c:2619:16: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
  if (ptr->name != '\0') {
                ^~
../common/ns_writes.c:2619:6: note: did you mean to dereference the pointer?
  if (ptr->name != '\0') {
      ^
../common/ns_writes.c: In function '__s_cvt_bootparams':
../common/ns_writes.c:2718:16: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
  if (ptr->name != '\0') {
                ^~
../common/ns_writes.c:2718:6: note: did you mean to dereference the pointer?
  if (ptr->name != '\0') {
      ^
../common/ns_writes.c: In function '__s_cvt_ethers':
../common/ns_writes.c:2782:38: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
  if (ptr->name == NULL || ptr->ether == '\0') {
                                      ^~
../common/ns_writes.c:2782:27: note: did you mean to dereference the pointer?
  if (ptr->name == NULL || ptr->ether == '\0') {
                           ^
cc1: all warnings being treated as errors

  

Issues

  • 0
  • 0
  • 1
  • 1
Description From Last Updated
Yuri Pankov
Toomas Soome
Toomas Soome
Toomas Soome
Toomas Soome
Gordon Ross
Andy Fiddaman
Toomas Soome
Ken Mays
Toomas Soome
Vitaliy Gusev
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...