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 #1

Updated by Electric Monk about 2 years ago

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

git commit baa111a1f46457da764bd7a40234b4f9a2de1885

commit  baa111a1f46457da764bd7a40234b4f9a2de1885
Author: Toomas Soome <tsoome@me.com>
Date:   2020-05-10T07:41:33.000Z

    12629 daktari: smatch and NULL pointer errors
    Reviewed by: C Fraire <cfraire@me.com>
    Approved by: Gordon Ross <gordon.w.ross@gmail.com>

Actions

Also available in: Atom PDF