@@ -336,7 +336,7 @@ int cmd_read_labels(int argc, const char **argv)
struct ndctl_dimm *dimm;
struct ndctl_ctx *ctx;
struct ndctl_bus *bus;
- int i, rc, count, err = 0;
+ int i, rc, count = 0, err = 0;
FILE *f_out = NULL;
argc = parse_options(argc, argv, nmem_options, u, 0);
@@ -377,7 +377,6 @@ int cmd_read_labels(int argc, const char **argv)
if (rc < 0)
goto out;
- count = 0;
ndctl_bus_foreach(ctx, bus) {
if (!util_bus_filter(bus, nmem_bus))
continue;
@@ -490,8 +490,8 @@ static int zero_info_block(struct ndctl_namespace *ndns)
{
const char *devname = ndctl_namespace_get_devname(ndns);
int fd, rc = -ENXIO;
+ void *buf = NULL;
char path[50];
- void *buf;
ndctl_namespace_set_raw_mode(ndns, 1);
rc = ndctl_namespace_enable(ndns);
builtin-read-labels.c:417:5: warning: 'count' may be used uninitialized in this function builtin-xaction-namespace.c:526:2: warning: 'buf' may be used uninitialized in this function Signed-off-by: Dan Williams <dan.j.williams@intel.com> --- builtin-read-labels.c | 3 +-- builtin-xaction-namespace.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-)