diff options
-rw-r--r-- | usr/src/cmd/stat/kstat/Makefile | 5 | ||||
-rw-r--r-- | usr/src/cmd/stat/kstat/kstat.c | 9 | ||||
-rw-r--r-- | usr/src/cmd/stat/kstat/kstat.h | 2 |
3 files changed, 10 insertions, 6 deletions
diff --git a/usr/src/cmd/stat/kstat/Makefile b/usr/src/cmd/stat/kstat/Makefile index 0fefda6d81..4c072ccd61 100644 --- a/usr/src/cmd/stat/kstat/Makefile +++ b/usr/src/cmd/stat/kstat/Makefile @@ -35,6 +35,11 @@ CFLAGS += $(CCVERBOSE) -I${STATCOMMONDIR} CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-parentheses + +CPPFLAGS_sparc += -I$(SRC)/uts/sfmmu +CPPFLAGS_sparc += -I$(SRC)/uts/sun4u/sunfire +CPPFLAGS += $(CPPFLAGS_$(MACH)) + FILEMODE= 0555 lint := LINTFLAGS = -muxs -I$(STATCOMMONDIR) diff --git a/usr/src/cmd/stat/kstat/kstat.c b/usr/src/cmd/stat/kstat/kstat.c index ed78340ec2..2165101ac9 100644 --- a/usr/src/cmd/stat/kstat/kstat.c +++ b/usr/src/cmd/stat/kstat/kstat.c @@ -1261,15 +1261,15 @@ short_array_to_string(short *shortp, int len) for (; len > 1; len--, shortp++) { if (list == NULL) { - (void) asprintf(&list_buf, "%d,", *shortp); + (void) asprintf(&list_buf, "%hd,", *shortp); } else { - (void) asprintf(&list_buf, "%s%d,", list, *shortp); + (void) asprintf(&list_buf, "%s%hd,", list, *shortp); free(list); } list = list_buf; } - (void) asprintf(&list_buf, "%s%s", list, *shortp); + (void) asprintf(&list_buf, "%s%hd", list, *shortp); free(list); return (list_buf); } @@ -1279,7 +1279,6 @@ save_temperature(kstat_t *kp, ks_instance_t *ksi) { struct temp_stats *temps = (struct temp_stats *)(kp->ks_data); char *buf; - int n = 1; assert(kp->ks_data_size == sizeof (struct temp_stats)); @@ -1381,7 +1380,7 @@ save_fault_list(kstat_t *kp, ks_instance_t *ksi) (void) snprintf(name, sizeof (name), "create_time_%d", i); SAVE_HRTIME_X(ksi, name, fault->create_time); (void) snprintf(name, sizeof (name), "msg_%d", i); - SAVE_STRING_X(ksi, name, faultp->msg); + SAVE_STRING_X(ksi, name, fault->msg); } } #endif diff --git a/usr/src/cmd/stat/kstat/kstat.h b/usr/src/cmd/stat/kstat/kstat.h index dfbfd7d1c2..dcad921737 100644 --- a/usr/src/cmd/stat/kstat/kstat.h +++ b/usr/src/cmd/stat/kstat/kstat.h @@ -150,7 +150,7 @@ typedef union ks_value { #define SAVE_CHAR_X(I, N, V) \ { \ ks_value_t v; \ - asprintf(&v.str.addr.ptr, "%c", V); \ + (void) asprintf(&v.str.addr.ptr, "%c", V); \ v.str.len = 1; \ nvpair_insert(I, N, &v, KSTAT_DATA_STRING); \ } |