Project

General

Profile

Actions

Bug #12629

closed

daktari: smatch and NULL pointer errors

Added by Toomas Soome about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
kernel
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Build errors on SPARC with NULL pointers:

    ../../../sun4u/daktari/io/hpc3130_dak.c: In function 'hpc3130_get':
    ../../../sun4u/daktari/io/hpc3130_dak.c:339: error: comparison between pointer and integer
    ../../../sun4u/daktari/io/hpc3130_dak.c: In function 'hpc3130_set':
    ../../../sun4u/daktari/io/hpc3130_dak.c:383: error: comparison between pointer and integer
    ../../../sun4u/daktari/io/hpc3130_dak.c: In function 'hpc3130_ioctl':
    ../../../sun4u/daktari/io/hpc3130_dak.c:525: error: comparison between pointer and integer
    ../../../sun4u/daktari/io/hpc3130_dak.c:569: error: comparison between pointer and integer
    ../../../sun4u/daktari/io/hpc3130_dak.c: In function 'hpc3130_do_attach':
    ../../../sun4u/daktari/io/hpc3130_dak.c:986: error: passing argument 6 of 'ddi_create_minor_node' makes integer from pointer without a cast
    ../../../common/sys/sunddi.h:1571: note: expected 'int' but argument is of type 'void *'
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../../../sun4u/daktari/io/hpc3130_dak.c:584 hpc3130_ioctl() warn: inconsistent indenting
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../../../sun4u/daktari/io/hpc3130_dak.c:2054 hpc3130_lookup_slot() error: testing array offset 'i' after use.

Actions

Also available in: Atom PDF