diff --git a/ChangeLog b/ChangeLog index 2f951473..356f9b9a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,9 @@ $Id$ 2023-07-10 Christian Franke + dev_interface.cpp: Don't pass local buffer address to caller + (cppcheck 2.11: autoVariables). + scsiprint.cpp: Remove unused code, remove unused variable (cppcheck 2.11: knownConditionTrueFalse, unusedVariable). diff --git a/dev_interface.cpp b/dev_interface.cpp index 7771ed23..40bd8411 100644 --- a/dev_interface.cpp +++ b/dev_interface.cpp @@ -209,6 +209,7 @@ bool scsi_device::scsi_pass_through_and_check(scsi_cmnd_io * iop, if (scsi_debugmode > 0) pout("%sscsi_pass_through() failed, errno=%d [%s]\n", msg, get_errno(), get_errmsg()); + iop->sensep = nullptr; return false; } @@ -216,6 +217,7 @@ bool scsi_device::scsi_pass_through_and_check(scsi_cmnd_io * iop, scsi_sense_disect sinfo; scsi_do_sense_disect(iop, &sinfo); int err = scsiSimpleSenseFilter(&sinfo); + iop->sensep = nullptr; if (err) { if (scsi_debugmode > 0) pout("%sscsi error: %s\n", msg, scsiErrString(err));