Project

General

Profile

Actions

Bug #10686

closed

Debug macros causes smatch issues

Added by John Levon almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
2019-04-03
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage smatch
Gerrit CR:

Description

Various kernel debug macros need adjusting for smatch

Actions #1

Updated by John Levon almost 3 years ago

The problem is with defines like this:

 #ifdef DEBUG
 #define        SCSA2USB_PRINT_CDB      scsa2usb_print_cdb
 #else
-#define        SCSA2USB_PRINT_CDB      0 &&
+#define        SCSA2USB_PRINT_CDB
 #endif

We need to get rid of the 0 && part, otherwise if an argument has been dereferenced previously,
smatch incorrectly reports a problem when !DEBUG.

Actions #2

Updated by John Levon almost 3 years ago

  • Tags changed from needs-triage to needs-triage smatch
Actions #3

Updated by Electric Monk almost 3 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit fd826efa0fbcbc82b734a8db80a074204cf11b22

commit  fd826efa0fbcbc82b734a8db80a074204cf11b22
Author: John Levon <john.levon@joyent.com>
Date:   2019-04-11T21:22:30.000Z

    10686 Debug macros causes smatch issues
    Reviewed by: Richard Lowe <richlowe@richlowe.net>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF