summaryrefslogtreecommitdiff
path: root/usr/src/lib
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@fingolfin.org>2020-12-24 12:58:49 -0800
committerRobert Mustacchi <rm@fingolfin.org>2020-12-24 16:03:42 -0800
commit58d4b16fe601073f2408de78e3db7e9bfa9abfd2 (patch)
treea9d405db9a6c5e16f4a5b07fdccf8619483c3742 /usr/src/lib
parent1473b8d60e902819558a8b0e8a257eb0d754c3c3 (diff)
downloadillumos-joyent-58d4b16fe601073f2408de78e3db7e9bfa9abfd2.tar.gz
13355 remove topo module warning gags
Reviewed by: C Fraire <cfraire@me.com> Reviewed by: Yuri Pankov <yuripv@yuripv.dev> Reviewed by: Gergő Mihály Doma <domag02@gmail.com> Approved by: Richard Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src/lib')
-rw-r--r--usr/src/lib/fm/topo/modules/Makefile.plugin3
-rw-r--r--usr/src/lib/fm/topo/modules/common/disk/disk_common.c1
-rw-r--r--usr/src/lib/fm/topo/modules/common/ipmi/ipmi_enum.c6
-rw-r--r--usr/src/lib/fm/topo/modules/common/pcibus/pcibus.c2
-rw-r--r--usr/src/lib/fm/topo/modules/common/pcibus/pcibus_labels.c6
-rw-r--r--usr/src/lib/fm/topo/modules/common/shared/topo_sensor.c2
-rw-r--r--usr/src/lib/fm/topo/modules/i86pc/chip/chip_amd.c16
-rw-r--r--usr/src/lib/fm/topo/modules/i86pc/chip/chip_intel.c2
8 files changed, 21 insertions, 17 deletions
diff --git a/usr/src/lib/fm/topo/modules/Makefile.plugin b/usr/src/lib/fm/topo/modules/Makefile.plugin
index c42c02da80..c9203cd639 100644
--- a/usr/src/lib/fm/topo/modules/Makefile.plugin
+++ b/usr/src/lib/fm/topo/modules/Makefile.plugin
@@ -55,9 +55,6 @@ arch_ROOTCONF = $(ROOT)/usr/platform/$(ARCH)/lib/fm/topo/plugins/$(CONF)
plat_ROOTCONF = $(PLATFORMS:%=$(ROOT)/usr/platform/%/lib/fm/topo/plugins/$(CONF))
ROOTCONF = $($(CLASS)_ROOTCONF)
-CERRWARN += $(CNOWARN_UNINIT)
-CERRWARN += -_gcc=-Wno-parentheses
-
APIMAP = ../../../libtopo/common/topo_mod.map
MAPFILES = # use APIMAP instead
diff --git a/usr/src/lib/fm/topo/modules/common/disk/disk_common.c b/usr/src/lib/fm/topo/modules/common/disk/disk_common.c
index 7c9027517d..0f4e03b813 100644
--- a/usr/src/lib/fm/topo/modules/common/disk/disk_common.c
+++ b/usr/src/lib/fm/topo/modules/common/disk/disk_common.c
@@ -1165,6 +1165,7 @@ disk_status(topo_mod_t *mod, tnode_t *nodep, topo_version_t vers,
*/
if (nvlist_lookup_string(in_nvl, "path", &fullpath) == 0) {
devpath = NULL;
+ pathlen = 0;
} else {
/*
* Get the /devices path and attempt to open the disk status
diff --git a/usr/src/lib/fm/topo/modules/common/ipmi/ipmi_enum.c b/usr/src/lib/fm/topo/modules/common/ipmi/ipmi_enum.c
index 32b555a3bd..e0a768462d 100644
--- a/usr/src/lib/fm/topo/modules/common/ipmi/ipmi_enum.c
+++ b/usr/src/lib/fm/topo/modules/common/ipmi/ipmi_enum.c
@@ -451,6 +451,12 @@ ipmi_check_entity(ipmi_handle_t *ihp, ipmi_entity_t *ep, void *data)
case IPMI_ET_FAN:
labelname = "FAN";
break;
+
+ default:
+ topo_mod_dprintf(mod, "unknown entity type, %u: cannot set "
+ "label name", edp->ed_entity);
+ nvlist_free(fmri);
+ return (1);
}
len = strlen(label);
diff --git a/usr/src/lib/fm/topo/modules/common/pcibus/pcibus.c b/usr/src/lib/fm/topo/modules/common/pcibus/pcibus.c
index b2b56e5eea..92c5b721e9 100644
--- a/usr/src/lib/fm/topo/modules/common/pcibus/pcibus.c
+++ b/usr/src/lib/fm/topo/modules/common/pcibus/pcibus.c
@@ -671,7 +671,7 @@ declare_dev_and_fn(topo_mod_t *mod, tnode_t *bus, tnode_t **dev, di_node_t din,
tnode_t *fn;
uint_t class, subclass;
uint_t vid, did;
- uint_t pdev_sz;
+ uint_t pdev_sz = 0;
did_t *dp = NULL;
if (*dev == NULL) {
diff --git a/usr/src/lib/fm/topo/modules/common/pcibus/pcibus_labels.c b/usr/src/lib/fm/topo/modules/common/pcibus/pcibus_labels.c
index 1a767312a1..254cae00c3 100644
--- a/usr/src/lib/fm/topo/modules/common/pcibus/pcibus_labels.c
+++ b/usr/src/lib/fm/topo/modules/common/pcibus/pcibus_labels.c
@@ -127,7 +127,7 @@ pci_label_slotname_lookup(topo_mod_t *mod, char *platform,
topo_mod_dprintf(mod,
"%s: calling test function=%p\n",
__func__, rw.srw_test);
- if (ret = rw.srw_test(mod, dp))
+ if ((ret = rw.srw_test(mod, dp)) != 0)
rlabel = rw.srw_new;
topo_mod_dprintf(mod,
"%s: test function return=%d\n",
@@ -192,7 +192,7 @@ pci_label_missing_lookup(topo_mod_t *mod, char *platform, did_t *dp)
topo_mod_dprintf(mod,
"%s: calling test function=%p\n",
__func__, m.dl_test);
- if (ret = m.dl_test(mod, dp))
+ if ((ret = m.dl_test(mod, dp)) != 0)
rlabel = m.dl_label;
topo_mod_dprintf(mod,
"%s: test function return=%d\n",
@@ -222,7 +222,7 @@ pci_slot_label_lookup(topo_mod_t *mod, tnode_t *node, did_t *dp, did_t *pdp)
{
tnode_t *anode, *apnode;
did_t *adp, *apdp;
- char *plat, *pp, *l, *ancestor_l = NULL, *new_l = NULL;
+ char *plat, *pp, *l = NULL, *ancestor_l = NULL, *new_l = NULL;
int err, b, d, f, done = 0;
size_t len;
diff --git a/usr/src/lib/fm/topo/modules/common/shared/topo_sensor.c b/usr/src/lib/fm/topo/modules/common/shared/topo_sensor.c
index a716c57a66..3cf969d697 100644
--- a/usr/src/lib/fm/topo/modules/common/shared/topo_sensor.c
+++ b/usr/src/lib/fm/topo/modules/common/shared/topo_sensor.c
@@ -260,7 +260,7 @@ topo_sensor_create_scalar_sensor(topo_mod_t *mod, tnode_t *pnode,
reader_arg, &err) != 0) {
topo_mod_dprintf(mod, "failed to set argument for sensor %s: "
"%s", path, topo_strerror(err));
- err = topo_mod_seterrno(mod, err);
+ ret = topo_mod_seterrno(mod, err);
goto out;
}
diff --git a/usr/src/lib/fm/topo/modules/i86pc/chip/chip_amd.c b/usr/src/lib/fm/topo/modules/i86pc/chip/chip_amd.c
index d9a8eca7b8..0ac0523cf6 100644
--- a/usr/src/lib/fm/topo/modules/i86pc/chip/chip_amd.c
+++ b/usr/src/lib/fm/topo/modules/i86pc/chip/chip_amd.c
@@ -467,10 +467,10 @@ amd_dimm_create(topo_mod_t *mod, uint16_t chip_smbid, tnode_t *pnode,
nvlist_t *fmri, **dimmarr = NULL;
uint64_t num;
uint_t ndimm;
- id_t smbid;
- const char *serial;
- const char *part;
- const char *rev;
+ id_t smbid = -1;
+ const char *serial = NULL;
+ const char *part = NULL;
+ const char *rev = NULL;
if (nvlist_lookup_nvlist_array(mc, "dimmlist", &dimmarr, &ndimm) != 0) {
whinge(mod, NULL, "amd_dimm_create: dimmlist lookup failed\n");
@@ -562,10 +562,10 @@ amd_dimm_create(topo_mod_t *mod, uint16_t chip_smbid, tnode_t *pnode,
for (nvp = nvlist_next_nvpair(dimmarr[i], NULL); nvp != NULL;
nvp = nvlist_next_nvpair(dimmarr[i], nvp)) {
- if (nvpair_type(nvp) == DATA_TYPE_UINT64_ARRAY &&
- strcmp(nvpair_name(nvp), "csnums") == 0 ||
- nvpair_type(nvp) == DATA_TYPE_STRING_ARRAY &&
- strcmp(nvpair_name(nvp), "csnames") == 0)
+ if ((nvpair_type(nvp) == DATA_TYPE_UINT64_ARRAY &&
+ strcmp(nvpair_name(nvp), "csnums") == 0) ||
+ (nvpair_type(nvp) == DATA_TYPE_STRING_ARRAY &&
+ strcmp(nvpair_name(nvp), "csnames") == 0))
continue; /* used in amd_rank_create() */
nerr += nvprop_add(mod, nvp, PGNAME(DIMM), dimmnode);
diff --git a/usr/src/lib/fm/topo/modules/i86pc/chip/chip_intel.c b/usr/src/lib/fm/topo/modules/i86pc/chip/chip_intel.c
index df6e2b6f95..4168a3516e 100644
--- a/usr/src/lib/fm/topo/modules/i86pc/chip/chip_intel.c
+++ b/usr/src/lib/fm/topo/modules/i86pc/chip/chip_intel.c
@@ -200,7 +200,7 @@ mc_add_dimms(topo_mod_t *mod, uint16_t chip_smbid, tnode_t *pnode,
char *rev = NULL;
char *label = NULL;
char *name;
- id_t smbid;
+ id_t smbid = -1;
if (topo_node_range_create(mod, pnode, DIMM, 0,
maxdimms ? maxdimms-1 : ndimms-1) < 0) {