HomeFreeBSD

Fix the following clang 3.6.0 warnings in pciconf:

Description

Fix the following clang 3.6.0 warnings in pciconf:

usr.sbin/pciconf/pciconf.c:237:12: error: address of array 'p->pd_name' will
always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]

(p->pd_name && *p->pd_name) ? p->pd_name :
 ~~~^~~~~~~ ~~

usr.sbin/pciconf/pciconf.c:239:12: error: address of array 'p->pd_name' will
always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]

(p->pd_name && *p->pd_name) ? (int)p->pd_unit :
 ~~~^~~~~~~ ~~

The pd_name field of struct pci_conf is an array, so it can never be null.
Remove the unnecessary check.

Details

Provenance
dimAuthored on Jan 28 2015, 9:21 PM
Parents
rG464aad140717: Add allow.mount.fdescfs jail flag.
Branches
Unknown
Tags
Unknown

Event Timeline