Skip to content

Commit

Permalink
hw/bt.c: Move some debug ifdef to make static analysis happy
Browse files Browse the repository at this point in the history
Okay, so maybe the static analysis warning is all useless, and maybe
having the ifdef around a call is actually useful. I'll take the less
noise in my CI static analysis thing.

Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
stewartsmith committed Dec 11, 2018
1 parent babd5a2 commit e35f1cb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions hw/bt.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,9 +409,9 @@ static void bt_expire_old_msg(uint64_t tb)
}
}

#if BT_QUEUE_DEBUG
static void print_debug_queue_info(void)
{
#if BT_QUEUE_DEBUG
struct bt_msg *msg;
static bool printed;

Expand All @@ -426,8 +426,8 @@ static void print_debug_queue_info(void)
printed = true;
prlog(PR_DEBUG, "----- BT Msg Queue Empty -----\n");
}
#endif
}
#endif

static void bt_send_and_unlock(void)
{
Expand Down Expand Up @@ -473,7 +473,9 @@ static void bt_poll(struct timer *t __unused, void *data __unused,
*/
lock(&bt.lock);

#if BT_QUEUE_DEBUG
print_debug_queue_info();
#endif

bt_ctrl = bt_inb(BT_CTRL);

Expand Down

0 comments on commit e35f1cb

Please sign in to comment.