Commit 88da45bf authored by Daniel Verkamp's avatar Daniel Verkamp Committed by Jim Harris
Browse files

scsi: ensure bdlen is initialized before use



This fixes a false positive warning when building on GCC 7.2.1 with
CONFIG_COVERAGE=y.

bdlen is always initialized on the path where it can be used, but the
compiler seems to get confused when coverage is enabled, so zero out the
value at the top of the function.

Change-Id: Ifc13abff80124cad3d26286ffebf84f967141d13
Reported-by: default avatarJohn Meneghini <johnm@netapp.com>
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/396244


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 8be76f85
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1781,7 +1781,7 @@ spdk_bdev_scsi_process_primary(struct spdk_scsi_task *task)
	int rc = 0;
	int pllen, md = 0;
	int pf, sp;
	int bdlen, llba;
	int bdlen = 0, llba;
	int dbd, pc, page, subpage;
	int cmd_parsed = 0;