From c6cb86cc6a5bcc23fca1031d7ec1497ba4b284b1 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Thu, 14 Aug 2014 16:01:51 +0000 Subject: [PATCH] ins is only set and unused, but only when we're not doing software single stepping. Only set it when we're doing that by bending style(9) rules a little to avoid even worse #ifdef soup. --- sys/ddb/db_run.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/ddb/db_run.c b/sys/ddb/db_run.c index f0b31bf47d3..897dc3d5744 100644 --- a/sys/ddb/db_run.c +++ b/sys/ddb/db_run.c @@ -188,14 +188,14 @@ db_restart_at_pc(watchpt) if ((db_run_mode == STEP_COUNT) || (db_run_mode == STEP_RETURN) || (db_run_mode == STEP_CALLT)) { - db_expr_t ins; - /* * We are about to execute this instruction, * so count it now. */ - - ins = db_get_value(pc, sizeof(int), FALSE); +#ifdef SOFTWARE_SSTEP + db_expr_t ins = +#endif + db_get_value(pc, sizeof(int), FALSE); db_inst_count++; db_load_count += inst_load(ins); db_store_count += inst_store(ins);