From 7946b99ae260f2554815cba9fd080f67cf169f51 Mon Sep 17 00:00:00 2001 From: hap Date: Wed, 20 Sep 2023 14:19:36 +0200 Subject: [PATCH] nscsi_bus: fix -Wuninitialized warning --- src/devices/machine/nscsi_bus.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/devices/machine/nscsi_bus.h b/src/devices/machine/nscsi_bus.h index 6d1142b15d5..76b5a0a6e79 100644 --- a/src/devices/machine/nscsi_bus.h +++ b/src/devices/machine/nscsi_bus.h @@ -661,6 +661,18 @@ protected: void scsi_data_out(int buf, int size); struct sense_data { + sense_data() + { + invalid = false; + deferred = false; + filemark = false; + eom = false; + bad_len = false; + sense_key = 0; + info = 0; + sense_key_code = 0; + } + bool invalid; bool deferred; bool filemark; @@ -679,7 +691,7 @@ protected: void report_bom(const s32 info = 0); void report_ew(const s32 info = 0); void report_eod(const s32 info = 0, const bool eom = false); - void report_eom(const bool write, const s32 info = 0, const bool invalid = 0); + void report_eom(const bool write, const s32 info = 0, const bool invalid = false); void report_bad_len(const bool over, const s32 info = 0); void report_bad_cdb_field(); void report_bad_pl_field();