Skip to content

Commit d7bac36

Browse files
committed
crc: Fix warning in perf test from uninitialized tmp ptr
Both gcc and clang are showing a warning on this despite the buffer always being set before use. Change-Id: I0e8f6b9e3451efe69e49814abc883d49b04f2666 Signed-off-by: Greg Tucker <[email protected]>
1 parent fe4b7f9 commit d7bac36

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

crc/crc16_t10dif_op_perf.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ struct blk_ext {
6464
uint16_t crc;
6565
};
6666

67-
void crc16_t10dif_copy_perf(struct blk *blks, struct blk *blkp, struct blk_ext *blks_ext,
68-
struct blk_ext *blkp_ext, uint16_t * crc)
67+
static void crc16_t10dif_copy_perf(struct blk *blks, struct blk *blkp,
68+
struct blk_ext *blks_ext, struct blk_ext *blkp_ext,
69+
uint16_t * crc)
6970
{
7071
int i;
7172
for (i = 0, blkp = blks, blkp_ext = blks_ext; i < NBLOCKS; i++) {
@@ -80,8 +81,8 @@ void crc16_t10dif_copy_perf(struct blk *blks, struct blk *blkp, struct blk_ext *
8081
int main(int argc, char *argv[])
8182
{
8283
uint16_t crc;
83-
struct blk *blks, *blkp;
84-
struct blk_ext *blks_ext, *blkp_ext;
84+
struct blk *blks = NULL, *blkp = NULL;
85+
struct blk_ext *blks_ext = NULL, *blkp_ext = NULL;
8586
struct perf start;
8687

8788
printf("crc16_t10dif_streaming_insert_perf:\n");

0 commit comments

Comments
 (0)