Project

General

Profile

Actions

Bug #11169

closed

nsswitch: NULL pointer errors

Added by Toomas Soome over 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

NULL pointer errors:

    ../common/mdns_common.c
    ../common/mdns_common.c: In function '_nss_mdns_queryrecord':
    ../common/mdns_common.c:94:42: error: comparison between pointer and integer [-Werror]
          (sockfd = DNSServiceRefSockFD(ref)) == NULL) {
                                              ^~

    ../common/getprinter.c: In function '_nss_user_printers_convert':
    ../common/getprinter.c:50:10: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       *value = NULL; value++;
              ^
    ../common/getprinter.c:52:18: error: comparison between pointer and integer [-Werror]
       while ((*value != NULL) && (isspace(*value) != 0))
                      ^~
    ../common/getprinter.c:56:9: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
        *key = NULL;
             ^
    ../common/getprinter.c:59:22: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
      args->buf.buffer[0] = NULL;
                          ^
    ../common/getprinter.c:60:33: error: comparison between pointer and integer [-Werror]
      if ((value == NULL) || (*value == NULL)) { /* bad value */
                                     ^~
    ../common/getprinter.c:74:48: error: comparison between pointer and integer [-Werror]
      while ((length < args->buf.buflen) && (*value != NULL)) {
                                                    ^~
    ../common/getprinter.c:85:27: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
      args->buf.buffer[length] = NULL; /* terminate, just in case */
                               ^

    ../common/getkeyent.c: In function '_nss_ldap_key2str':
    ../common/getkeyent.c:90:53: error: comparison between pointer and integer [-Werror]
       if (strncasecmp(*pkey_array, keytype, keytypelen) == NULL)
                                                         ^~
    ../common/getkeyent.c:115:53: error: comparison between pointer and integer [-Werror]
       if (strncasecmp(*skey_array, keytype, keytypelen) == NULL)
                                                         ^~

    ../common/getprinter.c: In function '_nss_ldap_printers2str':
    ../common/getprinter.c:215:39: error: comparison between pointer and integer [-Werror]
         for (kp = attr->attrvalue[j]; *kp != NULL; kp++)
                                           ^~
    ../common/getprinter.c: In function 'append_attr':
    ../common/getprinter.c:262:13: error: comparison between pointer and integer [-Werror]
      while (*cp != NULL) {
                 ^~
    cc1: all warnings being treated as errors

Actions #1

Updated by Electric Monk about 3 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit 6e6545bfaed3bab9ce836ee82d1abd8f2edba89a

commit  6e6545bfaed3bab9ce836ee82d1abd8f2edba89a
Author: Toomas Soome <tsoome@me.com>
Date:   2019-07-03T20:29:08.000Z

    11169 nsswitch: NULL pointer errors
    Reviewed by: C Fraire <cfraire@me.com>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Actions

Also available in: Atom PDF