diff options
author | John Levon <john.levon@joyent.com> | 2019-05-06 14:56:12 -0700 |
---|---|---|
committer | John Levon <john.levon@joyent.com> | 2019-05-08 01:51:53 -0700 |
commit | 0eb3364f7d9157494d68a9f390c120ca86e03be1 (patch) | |
tree | 84405e1c89f2ae7c987b8bb2e84f584b5a11a6a7 /usr/src | |
parent | 0384eafe3a68aa730dc01e59feac994868d42919 (diff) | |
download | illumos-joyent-0eb3364f7d9157494d68a9f390c120ca86e03be1.tar.gz |
10921 mdb_nicenum() needs smatch fix
Reviewed by: Jason King <jason.brian.king@gmail.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/cmd/mdb/Makefile.mdb | 4 | ||||
-rw-r--r-- | usr/src/cmd/mdb/common/mdb/mdb_modapi.c | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/usr/src/cmd/mdb/Makefile.mdb b/usr/src/cmd/mdb/Makefile.mdb index c235559ee5..5207c740f3 100644 --- a/usr/src/cmd/mdb/Makefile.mdb +++ b/usr/src/cmd/mdb/Makefile.mdb @@ -26,7 +26,7 @@ # # Copyright 2011 Nexenta Systems, Inc. All rights reserved. # Copyright (c) 2012 by Delphix. All rights reserved. -# Copyright (c) 2012 Joyent, Inc. All rights reserved. +# Copyright 2019 Joyent, Inc. # Copyright 2018 Jason King # @@ -109,8 +109,6 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-unused-variable -SMOFF += all_func_returns - # # -erroff=E_INCONS_ARG_DECL2 works around a problem where lint gets confused # about how struct mdb_tgt_gregset is used in mdb_tgt_stack_f() and diff --git a/usr/src/cmd/mdb/common/mdb/mdb_modapi.c b/usr/src/cmd/mdb/common/mdb/mdb_modapi.c index fd47330ef6..133a32a889 100644 --- a/usr/src/cmd/mdb/common/mdb/mdb_modapi.c +++ b/usr/src/cmd/mdb/common/mdb/mdb_modapi.c @@ -23,6 +23,7 @@ * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright 2016 Nexenta Systems, Inc. All rights reserved. + * Copyright 2019 Joyent, Inc. */ #include <mdb/mdb_modapi.h> @@ -92,11 +93,11 @@ mdb_nicenum(uint64_t num, char *buf) } else if (n < 10 && (num & (num - 1)) != 0) { (void) mdb_snprintfrac(buf, MDB_NICENUM_BUFLEN, num, 1ULL << 10 * index, 2); - strcat(buf, u); + (void) strcat(buf, u); } else if (n < 100 && (num & (num - 1)) != 0) { (void) mdb_snprintfrac(buf, MDB_NICENUM_BUFLEN, num, 1ULL << 10 * index, 1); - strcat(buf, u); + (void) strcat(buf, u); } else { (void) mdb_snprintf(buf, MDB_NICENUM_BUFLEN, "%llu%s", (u_longlong_t)n, u); |