Project

General

Profile

Bug #11346

hal: NULL pointer errors

Added by Toomas Soome 3 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

Build errors with NULL pointer:

    probe-storage.c: In function 'check_floppy':
    probe-storage.c:271:35: error: comparison between pointer and integer [-Werror]
       *wprot = ((chg & FDGC_CURWPROT) != NULL);
                                       ^~
    addon-cpufreq.c: In function 'edit_power_conf_file':
    addon-cpufreq.c:192:27: error: comparison between pointer and integer [-Werror]
       if (pc_edit_type.cpu_th == NULL) {
                               ^~
    ../../utils/printer.c
    ../../utils/printer.c: In function 'strip_ws':
    ../../utils/printer.c:34:15: error: comparison between pointer and integer [-Werror]
       for (; ((*s != NULL) && (isspace(*s) != 0)); s++);
                   ^~

    common.c: In function 'network_device_name_to_udi':
    common.c:51:21: error: comparison between pointer and integer [-Werror]
      for (i = 0; udi[i] != NULL; i++)
                         ^~

    ../../probing/network-printer/probe-snmp.c: In function 'hrDeviceDesc_to_info':
    ../../probing/network-printer/probe-snmp.c:42:9: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
        *s++ = NULL;
             ^
    cc1: all warnings being treated as errors

History

#1

Updated by Electric Monk 3 months ago

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

git commit 32248f11785f2b2ee12fa041aa8a92932c1245ca

commit  32248f11785f2b2ee12fa041aa8a92932c1245ca
Author: Toomas Soome <tsoome@me.com>
Date:   2019-07-12T06:06:54.000Z

    11346 hal: NULL pointer errors
    Reviewed by: Garrett D'Amore <garrett@damore.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF