summaryrefslogtreecommitdiffstats
path: root/module/zfs/vdev_raidz.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2010-08-26 09:58:04 -0700
committerBrian Behlendorf <[email protected]>2010-08-31 08:38:43 -0700
commitd4ed667343c3dac114642b9f6cb4f7baa3ff7334 (patch)
tree16b3f627625f83d0214446fb6f867e100f1a34c5 /module/zfs/vdev_raidz.c
parent1fde1e37208c2f56c72c70a06676676f04b65998 (diff)
Fix gcc uninitialized variable warnings
Gcc -Wall warn: 'uninitialized variable' Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'module/zfs/vdev_raidz.c')
-rw-r--r--module/zfs/vdev_raidz.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/module/zfs/vdev_raidz.c b/module/zfs/vdev_raidz.c
index af2de40ac..ef2054233 100644
--- a/module/zfs/vdev_raidz.c
+++ b/module/zfs/vdev_raidz.c
@@ -1189,7 +1189,7 @@ vdev_raidz_matrix_reconstruct(raidz_map_t *rm, int n, int nmissing,
uint64_t ccount;
uint8_t *dst[VDEV_RAIDZ_MAXPARITY];
uint64_t dcount[VDEV_RAIDZ_MAXPARITY];
- uint8_t log, val;
+ uint8_t log = 0, val;
int ll;
uint8_t *invlog[VDEV_RAIDZ_MAXPARITY];
uint8_t *p, *pp;
@@ -1638,8 +1638,11 @@ raidz_checksum_verify(zio_t *zio)
{
zio_bad_cksum_t zbc;
raidz_map_t *rm = zio->io_vsd;
+ int ret;
- int ret = zio_checksum_error(zio, &zbc);
+ bzero(&zbc, sizeof (zio_bad_cksum_t));
+
+ ret = zio_checksum_error(zio, &zbc);
if (ret != 0 && zbc.zbc_injected != 0)
rm->rm_ecksuminjected = 1;
@@ -1862,7 +1865,7 @@ vdev_raidz_io_done(zio_t *zio)
vdev_t *vd = zio->io_vd;
vdev_t *cvd;
raidz_map_t *rm = zio->io_vsd;
- raidz_col_t *rc;
+ raidz_col_t *rc = NULL;
int unexpected_errors = 0;
int parity_errors = 0;
int parity_untried = 0;