Project

General

Profile

Bug #4077

cleanup gcc warnings in cmd/hal

Added by Igor Kozhukhov almost 7 years ago. Updated almost 7 years ago.

Status:
In Progress
Priority:
Normal
Category:
-
Start date:
2013-08-24
Due date:
% Done:

90%

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

Description

hald_dbus.c: In function 'manager_unclaim_branch':
hald_dbus.c:2183:13: error: 'sender' may be used uninitialized in this function [-Werror=uninitialized]
cc1: all warnings being treated as errors
../../utils/cdutils.c: In function 'uscsi':
../../utils/cdutils.c:52:1: error: 'total_retries' is used uninitialized in this function [-Werror=uninitialized]
cc1: all warnings being treated as errors

History

#1

Updated by Igor Kozhukhov almost 7 years ago

  • % Done changed from 80 to 90
#2

Updated by Igor Kozhukhov almost 7 years ago

review:
http://cr.dilos.org/cr/il-4077/

hald_dbus.c: In function 'manager_unclaim_branch':
hald_dbus.c:2183:13: error: 'sender' may be used uninitialized in this function [-Werror=uninitialized]
cc1: all warnings being treated as errors

'sender' variable will be undefined at line 2183 for using in function 'strcmp'

../../utils/cdutils.c: In function 'uscsi':
../../utils/cdutils.c:52:1: error: 'total_retries' is used uninitialized in this function [-Werror=uninitialized]
cc1: all warnings being treated as errors

variable 'total_retries' will be undefined at line 87 with increment value.

additional files contain unused variables:
usr/src/cmd/hal/hald/solaris/devinfo.c
usr/src/cmd/hal/hald/solaris/devinfo_acpi.c
usr/src/cmd/hal/hald/solaris/devinfo_storage.c
usr/src/cmd/hal/hald/solaris/devinfo_usb.c
usr/src/cmd/hal/hald/solaris/sysevent.c

Also available in: Atom PDF