Mercurial > illumos > git > illumos-omnios
changeset 23903:a87c414f8206
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>
author | Robert Mustacchi <rm@fingolfin.org> |
---|---|
date | Thu, 24 Dec 2020 12:58:49 -0800 |
parents | deb4016895be |
children | 6c4f74fe69e1 |
files | usr/src/lib/fm/topo/modules/Makefile.plugin usr/src/lib/fm/topo/modules/common/disk/disk_common.c usr/src/lib/fm/topo/modules/common/ipmi/ipmi_enum.c usr/src/lib/fm/topo/modules/common/pcibus/pcibus.c usr/src/lib/fm/topo/modules/common/pcibus/pcibus_labels.c usr/src/lib/fm/topo/modules/common/shared/topo_sensor.c usr/src/lib/fm/topo/modules/i86pc/chip/chip_amd.c usr/src/lib/fm/topo/modules/i86pc/chip/chip_intel.c |
diffstat | 8 files changed, 21 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/lib/fm/topo/modules/Makefile.plugin Wed Dec 23 17:23:44 2020 +0000 +++ b/usr/src/lib/fm/topo/modules/Makefile.plugin Thu Dec 24 12:58:49 2020 -0800 @@ -55,9 +55,6 @@ 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
--- a/usr/src/lib/fm/topo/modules/common/disk/disk_common.c Wed Dec 23 17:23:44 2020 +0000 +++ b/usr/src/lib/fm/topo/modules/common/disk/disk_common.c Thu Dec 24 12:58:49 2020 -0800 @@ -1165,6 +1165,7 @@ */ 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
--- a/usr/src/lib/fm/topo/modules/common/ipmi/ipmi_enum.c Wed Dec 23 17:23:44 2020 +0000 +++ b/usr/src/lib/fm/topo/modules/common/ipmi/ipmi_enum.c Thu Dec 24 12:58:49 2020 -0800 @@ -451,6 +451,12 @@ 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);
--- a/usr/src/lib/fm/topo/modules/common/pcibus/pcibus.c Wed Dec 23 17:23:44 2020 +0000 +++ b/usr/src/lib/fm/topo/modules/common/pcibus/pcibus.c Thu Dec 24 12:58:49 2020 -0800 @@ -671,7 +671,7 @@ 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) {
--- a/usr/src/lib/fm/topo/modules/common/pcibus/pcibus_labels.c Wed Dec 23 17:23:44 2020 +0000 +++ b/usr/src/lib/fm/topo/modules/common/pcibus/pcibus_labels.c Thu Dec 24 12:58:49 2020 -0800 @@ -127,7 +127,7 @@ 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 @@ 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 @@ { 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;
--- a/usr/src/lib/fm/topo/modules/common/shared/topo_sensor.c Wed Dec 23 17:23:44 2020 +0000 +++ b/usr/src/lib/fm/topo/modules/common/shared/topo_sensor.c Thu Dec 24 12:58:49 2020 -0800 @@ -260,7 +260,7 @@ 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; }
--- a/usr/src/lib/fm/topo/modules/i86pc/chip/chip_amd.c Wed Dec 23 17:23:44 2020 +0000 +++ b/usr/src/lib/fm/topo/modules/i86pc/chip/chip_amd.c Thu Dec 24 12:58:49 2020 -0800 @@ -467,10 +467,10 @@ 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 @@ 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);
--- a/usr/src/lib/fm/topo/modules/i86pc/chip/chip_intel.c Wed Dec 23 17:23:44 2020 +0000 +++ b/usr/src/lib/fm/topo/modules/i86pc/chip/chip_intel.c Thu Dec 24 12:58:49 2020 -0800 @@ -200,7 +200,7 @@ 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) {