aboutsummaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/bsg_queue_tst.c4
-rw-r--r--testing/sg_iovec_tst.cpp4
-rw-r--r--testing/sg_queue_tst.c2
-rw-r--r--testing/sg_tst_bidi.c2
-rw-r--r--testing/sg_tst_ioctl.c4
-rw-r--r--testing/sg_tst_nvme.c4
6 files changed, 10 insertions, 10 deletions
diff --git a/testing/bsg_queue_tst.c b/testing/bsg_queue_tst.c
index 011dcab3..2761f8bb 100644
--- a/testing/bsg_queue_tst.c
+++ b/testing/bsg_queue_tst.c
@@ -20,7 +20,7 @@
The default behaviour is to "queue at head" which is useful for
error processing but not for streaming READ and WRITE commands.
-* Copyright (C) 2010-2019 D. Gilbert
+* Copyright (C) 2010-2021 D. Gilbert
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
@@ -61,7 +61,7 @@ int main(int argc, char * argv[])
struct sg_io_v4 rio_hdr;
char * file_name = 0;
char ebuff[EBUFF_SZ];
- uint8_t sense_buffer[16][SENSE_BUFFER_LEN];
+ uint8_t sense_buffer[16][SENSE_BUFFER_LEN] = {0};
int q_at_tail = 0;
for (k = 1; k < argc; ++k) {
diff --git a/testing/sg_iovec_tst.cpp b/testing/sg_iovec_tst.cpp
index 6228b9eb..0d28526b 100644
--- a/testing/sg_iovec_tst.cpp
+++ b/testing/sg_iovec_tst.cpp
@@ -147,7 +147,7 @@ sg_read(int sg_fd, uint8_t * buff, int num_blocks, int from_block, int bs,
int elem_size, int async)
{
uint8_t rdCmd[10] = {READ_10, 0, 0, 0, 0, 0, 0, 0, 0, 0};
- uint8_t senseBuff[SENSE_BUFF_LEN];
+ uint8_t senseBuff[SENSE_BUFF_LEN] = {0};
struct sg_io_hdr io_hdr;
struct pollfd a_poll;
int dxfer_len = bs * num_blocks;
@@ -251,7 +251,7 @@ sg_read_v4(int sg_fd, uint8_t * buff, int num_blocks, int from_block, int bs,
int elem_size, int async)
{
uint8_t rdCmd[10] = {READ_10, 0, 0, 0, 0, 0, 0, 0, 0, 0};
- uint8_t senseBuff[SENSE_BUFF_LEN];
+ uint8_t senseBuff[SENSE_BUFF_LEN] = {0};
struct sg_io_v4 io_hdr;
struct pollfd a_poll;
int dxfer_len = bs * num_blocks;
diff --git a/testing/sg_queue_tst.c b/testing/sg_queue_tst.c
index f7754fae..79f9c28d 100644
--- a/testing/sg_queue_tst.c
+++ b/testing/sg_queue_tst.c
@@ -110,7 +110,7 @@ int main(int argc, char * argv[])
sg_io_hdr_t rio_hdr;
char * file_name = 0;
char ebuff[EBUFF_SZ];
- uint8_t sense_buffer[MAX_Q_LEN][SENSE_BUFFER_LEN];
+ uint8_t sense_buffer[MAX_Q_LEN][SENSE_BUFFER_LEN] = {0};
int q_len = DEF_Q_LEN;
for (k = 1; k < argc; ++k) {
diff --git a/testing/sg_tst_bidi.c b/testing/sg_tst_bidi.c
index 2fbb98ce..6865e9a9 100644
--- a/testing/sg_tst_bidi.c
+++ b/testing/sg_tst_bidi.c
@@ -182,7 +182,7 @@ main(int argc, char * argv[])
uint8_t * doutp;
uint8_t * free_doutp = NULL;
char ebuff[EBUFF_SZ];
- uint8_t sense_buffer[MAX_Q_LEN][SENSE_BUFFER_LEN];
+ uint8_t sense_buffer[MAX_Q_LEN][SENSE_BUFFER_LEN] = {0};
for (k = 1; k < argc; ++k) {
if (0 == memcmp("-b=", argv[k], 3)) {
diff --git a/testing/sg_tst_ioctl.c b/testing/sg_tst_ioctl.c
index f7a421e9..5f361d7b 100644
--- a/testing/sg_tst_ioctl.c
+++ b/testing/sg_tst_ioctl.c
@@ -635,7 +635,7 @@ do_mrqs(int sg_fd, int sg_fd2, int mrqs)
struct sg_io_v4 * h4p;
struct sg_io_v4 * mrq_h4p;
struct sg_io_v4 mrq_h4;
- uint8_t sense_buffer[SENSE_BUFFER_LEN];
+ uint8_t sense_buffer[SENSE_BUFFER_LEN] = {0};
uint8_t inq_cdb[INQ_CMD_LEN] = /* Device Id VPD page */
{0x12, 0x1, 0x83, 0, INQ_REPLY_LEN, 0};
uint8_t sdiag_cdb[SDIAG_CMD_LEN] =
@@ -786,7 +786,7 @@ main(int argc, char * argv[])
sg_io_hdr_t rio_hdr;
char ebuff[EBUFF_SZ];
char dname[256];
- uint8_t sense_buffer[MAX_Q_LEN][SENSE_BUFFER_LEN];
+ uint8_t sense_buffer[MAX_Q_LEN][SENSE_BUFFER_LEN] = {0};
const char * second_fname = NULL;
const char * cp;
char * chp;
diff --git a/testing/sg_tst_nvme.c b/testing/sg_tst_nvme.c
index 1adbfdef..d92d3b5d 100644
--- a/testing/sg_tst_nvme.c
+++ b/testing/sg_tst_nvme.c
@@ -381,7 +381,7 @@ nvme_din_admin_cmd(struct sg_pt_base * ptvp, const uint8_t *cmdp,
int res, k;
uint16_t sct_sc = 0;
uint32_t result, clen;
- uint8_t sense_b[SENSE_BUFF_NVME_LEN];
+ uint8_t sense_b[SENSE_BUFF_NVME_LEN] = {0};
uint8_t ucmd[128];
char b[32];
@@ -514,7 +514,7 @@ sg_scsi_inquiry(struct sg_pt_base * ptvp, bool evpd, int pg_op, void * resp,
{
int res, ret, k, sense_cat, resid;
uint8_t inq_cdb[INQUIRY_CMDLEN] = {INQUIRY_CMD, 0, 0, 0, 0, 0};
- uint8_t sense_b[SENSE_BUFF_LEN];
+ uint8_t sense_b[SENSE_BUFF_LEN] = {0};
uint8_t * up;
if (evpd)