summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2017-07-18 00:41:02 +0300
committerDan McDonald <danmcd@joyent.com>2018-05-15 11:12:44 -0400
commitb1da084b97cda9a2d087205b95c45a54ad654453 (patch)
treef82a3274796269cdd8a1fa6aff34520d7f0115e8
parent39df76fb09f8b2678db1cae82e66cd47f6930e4f (diff)
downloadillumos-joyent-b1da084b97cda9a2d087205b95c45a54ad654453.tar.gz
9309 mdb: this statement may fall through
Reviewed by: C Fraire <cfraire@me.com> Reviewed by: Jason King <jason.brian.king@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/cmd/mdb/common/mdb/mdb_io.c1
-rw-r--r--usr/src/cmd/mdb/common/mdb/mdb_main.c2
-rw-r--r--usr/src/cmd/mdb/common/modules/idm/idm.c56
-rw-r--r--usr/src/cmd/mdb/intel/kmdb/kmdb_dpi_isadep.c1
4 files changed, 35 insertions, 25 deletions
diff --git a/usr/src/cmd/mdb/common/mdb/mdb_io.c b/usr/src/cmd/mdb/common/mdb/mdb_io.c
index 84e7c92784..a1ebc1ebc2 100644
--- a/usr/src/cmd/mdb/common/mdb/mdb_io.c
+++ b/usr/src/cmd/mdb/common/mdb/mdb_io.c
@@ -904,6 +904,7 @@ iob_bytes2str(varglist_t *ap, intsize_t size)
case SZ_SHORT:
n = (ushort_t)VA_ARG(ap, uint_t);
+ break;
default:
n = (uint_t)VA_ARG(ap, uint_t);
diff --git a/usr/src/cmd/mdb/common/mdb/mdb_main.c b/usr/src/cmd/mdb/common/mdb/mdb_main.c
index 90e048bb82..7feec28a40 100644
--- a/usr/src/cmd/mdb/common/mdb/mdb_main.c
+++ b/usr/src/cmd/mdb/common/mdb/mdb_main.c
@@ -110,7 +110,7 @@ ucontext_t _mdb_abort_ctx; /* context fatal signal interrupted */
int _mdb_abort_rcount; /* number of times resume requested */
int _mdb_self_fd = -1; /* fd for self as for valid_frame */
-static void
+__NORETURN static void
terminate(int status)
{
(void) mdb_signal_blockall();
diff --git a/usr/src/cmd/mdb/common/modules/idm/idm.c b/usr/src/cmd/mdb/common/modules/idm/idm.c
index c465a9b8fb..4e4ad832c5 100644
--- a/usr/src/cmd/mdb/common/modules/idm/idm.c
+++ b/usr/src/cmd/mdb/common/modules/idm/idm.c
@@ -683,7 +683,8 @@ iscsi_cmd(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
static int
-iscsi_ini_hba_impl(uintptr_t addr, iscsi_dcmd_ctrl_t *idc) {
+iscsi_ini_hba_impl(uintptr_t addr, iscsi_dcmd_ctrl_t *idc)
+{
iscsi_hba_t ih;
if (mdb_vread(&ih, sizeof (ih), addr) != sizeof (ih)) {
@@ -1003,8 +1004,8 @@ iscsi_svc_walk_cb(uintptr_t addr, const void *list_walker_data,
/*ARGSUSED*/
static int
-iscsi_ini_hba_walk_cb(uintptr_t addr, const void *vhba,
- void *idc_void) {
+iscsi_ini_hba_walk_cb(uintptr_t addr, const void *vhba, void *idc_void)
+{
iscsi_dcmd_ctrl_t *idc = idc_void;
int rc;
@@ -2392,7 +2393,8 @@ iscsi_print_ini_lun(uintptr_t addr, const iscsi_lun_t *lun,
static int
iscsi_print_ini_cmd(uintptr_t addr, const iscsi_cmd_t *cmd,
- iscsi_dcmd_ctrl_t *idc) {
+ iscsi_dcmd_ctrl_t *idc)
+{
uintptr_t states_addr;
@@ -2666,13 +2668,15 @@ iscsi_sm_audit_impl(uintptr_t addr)
iscsi_iscsi_login_state(sar->sar_new_state);
break;
default:
+ state_name = new_state_name = "N/A";
break;
}
mdb_printf("%s|%s (%d)\n\t%9s %s (%d)\n",
ts_string, state_name, sar->sar_state,
"New State", new_state_name, sar->sar_new_state);
+
+ break;
default:
- state_name = new_state_name = "N/A";
break;
}
@@ -3222,9 +3226,8 @@ iscsi_isns(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
}
static int
-iscsi_ini_sess_walk_init(mdb_walk_state_t *wsp) {
-
-
+iscsi_ini_sess_walk_init(mdb_walk_state_t *wsp)
+{
if (wsp->walk_addr == NULL) {
mdb_warn("<iscsi_sess_t addr>::walk iscsi_ini_sess");
return (WALK_ERR);
@@ -3240,7 +3243,8 @@ iscsi_ini_sess_walk_init(mdb_walk_state_t *wsp) {
}
static int
-iscsi_ini_sess_step(mdb_walk_state_t *wsp) {
+iscsi_ini_sess_step(mdb_walk_state_t *wsp)
+{
int status;
if (wsp->walk_addr == NULL) {
@@ -3263,8 +3267,8 @@ iscsi_ini_sess_step(mdb_walk_state_t *wsp) {
}
static int
-iscsi_ini_conn_walk_init(mdb_walk_state_t *wsp) {
-
+iscsi_ini_conn_walk_init(mdb_walk_state_t *wsp)
+{
if (wsp->walk_addr == NULL) {
mdb_warn("<iscsi_conn_t addr>::walk iscsi_ini_conn");
return (WALK_DONE);
@@ -3280,7 +3284,8 @@ iscsi_ini_conn_walk_init(mdb_walk_state_t *wsp) {
}
static int
-iscsi_ini_conn_step(mdb_walk_state_t *wsp) {
+iscsi_ini_conn_step(mdb_walk_state_t *wsp)
+{
int status;
if (wsp->walk_addr == NULL) {
@@ -3304,8 +3309,8 @@ iscsi_ini_conn_step(mdb_walk_state_t *wsp) {
}
static int
-iscsi_ini_lun_walk_init(mdb_walk_state_t *wsp) {
-
+iscsi_ini_lun_walk_init(mdb_walk_state_t *wsp)
+{
if (wsp->walk_addr == NULL) {
mdb_warn("<iscsi_lun_t addr>::walk iscsi_ini_lun");
return (WALK_DONE);
@@ -3320,7 +3325,8 @@ iscsi_ini_lun_walk_init(mdb_walk_state_t *wsp) {
}
static int
-iscsi_ini_lun_step(mdb_walk_state_t *wsp) {
+iscsi_ini_lun_step(mdb_walk_state_t *wsp)
+{
int status;
if (wsp->walk_addr == NULL) {
@@ -3343,8 +3349,8 @@ iscsi_ini_lun_step(mdb_walk_state_t *wsp) {
}
static int
-iscsi_ini_cmd_walk_init(mdb_walk_state_t *wsp) {
-
+iscsi_ini_cmd_walk_init(mdb_walk_state_t *wsp)
+{
if (wsp->walk_addr == NULL) {
mdb_warn("<iscsi_cmd_t addr>::walk iscsi_ini_cmd");
return (WALK_DONE);
@@ -3359,7 +3365,8 @@ iscsi_ini_cmd_walk_init(mdb_walk_state_t *wsp) {
}
static int
-iscsi_ini_cmd_step(mdb_walk_state_t *wsp) {
+iscsi_ini_cmd_step(mdb_walk_state_t *wsp)
+{
int status;
if (wsp->walk_addr == NULL) {
@@ -3382,9 +3389,8 @@ iscsi_ini_cmd_step(mdb_walk_state_t *wsp) {
}
static int
-iscsi_ini_cmd_walk_cb(uintptr_t addr, const void *vcmd,
- void *vidc) {
-
+iscsi_ini_cmd_walk_cb(uintptr_t addr, const void *vcmd, void *vidc)
+{
const iscsi_cmd_t *cmd = vcmd;
iscsi_dcmd_ctrl_t *idc = vidc;
int rc;
@@ -3400,7 +3406,8 @@ iscsi_ini_cmd_walk_cb(uintptr_t addr, const void *vcmd,
}
static int
-iscsi_ini_hba_walk_init(mdb_walk_state_t *wsp) {
+iscsi_ini_hba_walk_init(mdb_walk_state_t *wsp)
+{
uintptr_t state_addr, array_addr;
int array_size;
struct i_ddi_soft_state *ss;
@@ -3408,7 +3415,7 @@ iscsi_ini_hba_walk_init(mdb_walk_state_t *wsp) {
hwi = (idm_hba_walk_info_t *)mdb_zalloc(
- sizeof (idm_hba_walk_info_t), UM_SLEEP|UM_GC);
+ sizeof (idm_hba_walk_info_t), UM_SLEEP|UM_GC);
if (!hwi) {
mdb_warn("unable to allocate storage for iscsi_ini_hba walk");
@@ -3461,7 +3468,8 @@ iscsi_ini_hba_walk_init(mdb_walk_state_t *wsp) {
}
static int
-iscsi_ini_hba_step(mdb_walk_state_t *wsp) {
+iscsi_ini_hba_step(mdb_walk_state_t *wsp)
+{
int status;
idm_hba_walk_info_t *hwi = (idm_hba_walk_info_t *)wsp->walk_data;
diff --git a/usr/src/cmd/mdb/intel/kmdb/kmdb_dpi_isadep.c b/usr/src/cmd/mdb/intel/kmdb/kmdb_dpi_isadep.c
index 100cbe4be1..56630dd8a6 100644
--- a/usr/src/cmd/mdb/intel/kmdb/kmdb_dpi_isadep.c
+++ b/usr/src/cmd/mdb/intel/kmdb/kmdb_dpi_isadep.c
@@ -51,6 +51,7 @@ kmdb_dpi_handle_fault(kreg_t trapno, kreg_t pc, kreg_t sp, int cpuid)
switch (trapno) {
case T_GPFLT:
errno = EACCES;
+ break;
default:
errno = EMDB_NOMAP;
}