Project

General

Profile

Bug #12564

sbus: NULL pointer and smatch errors

Added by Toomas Soome 3 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
driver - device drivers
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Build errors with NULL pointer:

    ../../sun4u/io/sysiosbus.c:74: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:76: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:78: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:80: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:82: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:84: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:86: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:88: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:90: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:92: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:94: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:96: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:98: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:100: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:102: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:104: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:106: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:108: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:110: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:112: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:114: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:116: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:118: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:120: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:122: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:124: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:126: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:128: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:157: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:157: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:157: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:158: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:158: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c:158: error: initialization makes integer from pointer without a cast
    ../../sun4u/io/sysiosbus.c: In function 'sbus_intr_reset':
    ../../sun4u/io/sysiosbus.c:2287: error: comparison between pointer and integer
    ../../sun4u/io/sysiosbus.c: In function 'sbus_add_picN_kstats':
    ../../sun4u/io/sysiosbus.c:2366: error: passing argument 7 of 'kstat_create' makes integer from pointer without a cast
    ../../common/sys/kstat.h:793: note: expected 'uchar_t' but argument is of type 'void *'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../../sun4u/io/sysiosbus.c:1658 sbus_add_intr_impl() warn: unsigned 'slot' is never less than zero.
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../../sun4u/io/sysiosbus.c:2371 sbus_add_picN_kstats() warn: inconsistent indenting
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../../sun4u/io/sysiosbus.c:2454 sbus_add_kstats() warn: inconsistent indenting

    ../../sun4u/io/iommu.c: In function 'iommu_dma_bindhdl':
    ../../sun4u/io/iommu.c:901: error: assignment makes integer from pointer without a cast

Testing done: build/install/boot cycle.


Related issues

Related to illumos gate - Bug #12814: CCVERBOSE flag in CFLAGS is redundant and not neededIn Progress

Actions

History

#1

Updated by Toomas Soome about 1 month ago

  • Related to Bug #12814: CCVERBOSE flag in CFLAGS is redundant and not needed added
#2

Updated by Toomas Soome about 1 month ago

  • Description updated (diff)
#3

Updated by Electric Monk about 1 month ago

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

git commit 89545d90d6724cb5f0b2cc0d34b1e0b21f2c31f1

commit  89545d90d6724cb5f0b2cc0d34b1e0b21f2c31f1
Author: Toomas Soome <tsoome@me.com>
Date:   2020-06-03T20:48:02.000Z

    12564 sbus: NULL pointer and smatch errors
    Reviewed by: Robert Mustacchi <rm@fingolfin.org>
    Reviewed by: Yuri Pankov <ypankov@tintri.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF