Project

General

Profile

Actions

Bug #5526

closed

One more gcc warning for cmd/power

Added by Gary Mills almost 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
2015-01-12
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:
External Bug:

Description

On the SPARC platform, one more gcc warning for cmd/power appears:


handlers.c: In function 'ztop':
handlers.c:1018: error: suggest parentheses around assignment used as truth value [-Wparentheses]

This function is inside #ifdef sparc/#endif conditionals. The fix is simply to change line 1018 to read:


if ((p = strchr(pool_name, '/')) != NULL)

Actions #1

Updated by Gary Mills almost 9 years ago

  • Status changed from New to Feedback
  • Assignee set to Gary Mills
  • % Done changed from 0 to 90

The webrev for this bug is at:

http://cr.illumos.org/~webrev/jgmills/5526-1

Actions #2

Updated by Igor Kozhukhov almost 9 years ago

Gary Mills wrote:

The webrev for this bug is at:

http://cr.illumos.org/~webrev/jgmills/5526-1

+1 as reviewer

Actions #3

Updated by Electric Monk almost 9 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 90 to 100

git commit 4f1c6a56e2a145f04e3f26d5c1d6e79cff937069

commit  4f1c6a56e2a145f04e3f26d5c1d6e79cff937069
Author: Gary Mills <gary_mills@fastmail.fm>
Date:   2015-02-27T22:55:17.000Z

    5526 One more gcc warning for cmd/power
    Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
    Approved by: Dan McDonald <danmcd@omniti.com>

Actions #4

Updated by Gordon Ross over 8 years ago

The fix that went in is nice, but I recently ran into this (in a sparc build)

handlers.c: In function 'sfpath':
handlers.c:1118: error: 'dev' may be used uninitialized in this function [-Wuninitialized]

so one also needs something like
[ Opened #5680 for this. ]

Actions

Also available in: Atom PDF