Project

General

Profile

Actions

Bug #12653

closed

vnet: smatch and NULL pointer errors

Added by Toomas Soome about 2 years ago. Updated about 2 years 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 on SPARC with NULL pointers:

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../../sun4v/io/vnet.c:2483 vnet_rx_ring_stat() error: unchecked function return 'cbp->mc_getstat'

    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../../sun4v/io/vnet_txdring.c:1822 vgen_ldc_msg_worker() warn: ignoring unreachable code.

    ../../sun4v/io/vnet_gen.c: In function 'vgen_mdeg_reg':
    ../../sun4v/io/vnet_gen.c:1717: error: initialization makes integer from pointer without a cast
    ../../sun4v/io/vnet_gen.c:1718: error: initialization makes integer from pointer without a cast
    ../../sun4v/io/vnet_gen.c:1770: error: comparison between pointer and integer
    ../../sun4v/io/vnet_gen.c: In function 'vgen_mdeg_unreg':
    ../../sun4v/io/vnet_gen.c:1783: error: comparison between pointer and integer
    ../../sun4v/io/vnet_gen.c:1785: error: assignment makes integer from pointer without a cast
    ../../sun4v/io/vnet_gen.c:1787: error: comparison between pointer and integer
    ../../sun4v/io/vnet_gen.c:1789: error: assignment makes integer from pointer without a cast
    ../../sun4v/io/vnet_gen.c: In function 'vgen_ldc_cb':
    ../../sun4v/io/vnet_gen.c:3015: error: comparison between pointer and integer
    /code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../../sun4v/io/vnet_gen.c:791 vgen_portsend() warn: variable dereferenced before check 'portp' (see line 784)

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 b17aa18c453380499cb628ad8e7f7536bfd9d483

commit  b17aa18c453380499cb628ad8e7f7536bfd9d483
Author: Toomas Soome <tsoome@me.com>
Date:   2020-05-10T08:06:37.000Z

    12653 vnet: 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