From: Brian Behlendorf Date: Fri, 28 May 2010 21:56:00 +0000 (-0700) Subject: Merge commit 'refs/top-bases/gcc-uninit' into gcc-uninit X-Git-Tag: zfs-0.5.0~38^2^2~1^2^2~34^2~1^2^2~5^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cd47feb3c81db6181f7480a79d46b94609f804f9;p=zfs Merge commit 'refs/top-bases/gcc-uninit' into gcc-uninit Conflicts: cmd/zpool/zpool_main.c cmd/ztest/ztest.c module/zfs/arc.c --- cd47feb3c81db6181f7480a79d46b94609f804f9 diff --cc lib/libzfs/libzfs_dataset.c index b57d12031,a3f5a7d0f..bf9b38813 --- a/lib/libzfs/libzfs_dataset.c +++ b/lib/libzfs/libzfs_dataset.c @@@ -2581,11 -2754,10 +2754,10 @@@ in zfs_create_ancestors(libzfs_handle_t *hdl, const char *path) { int prefix; - uint64_t zoned; char *path_copy; - int rc; + int rc = 0; - if (check_parents(hdl, path, &zoned, B_TRUE, &prefix) != 0) + if (check_parents(hdl, path, NULL, B_TRUE, &prefix) != 0) return (-1); if ((path_copy = strdup(path)) != NULL) { diff --cc lib/libzfs/libzfs_util.c index 0dd5ed57d,2e73f76ea..ad74d5617 --- a/lib/libzfs/libzfs_util.c +++ b/lib/libzfs/libzfs_util.c @@@ -908,10 -925,10 +925,10 @@@ zprop_print_headers(zprop_get_cbdata_t void zprop_print_one_property(const char *name, zprop_get_cbdata_t *cbp, const char *propname, const char *value, zprop_source_t sourcetype, - const char *source) + const char *source, const char *recvd_value) { int i; - const char *str; + const char *str = NULL; char buf[128]; /* diff --cc module/zfs/arc.c index bfcb84451,8adb54dc6..eb3801705 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@@ -2957,10 -3026,15 +3026,15 @@@ arc_release(arc_buf_t *buf, void *tag arc_buf_hdr_t *hdr; kmutex_t *hash_lock = NULL; l2arc_buf_hdr_t *l2hdr; - uint64_t buf_size; + uint64_t buf_size = 0; - boolean_t released = B_FALSE; - rw_enter(&buf->b_lock, RW_WRITER); + /* + * It would be nice to assert that if it's DMU metadata (level > + * 0 || it's the dnode file), then it must be syncing context. + * But we don't know that information at this level. + */ + + mutex_enter(&buf->b_evict_lock); hdr = buf->b_hdr; /* this buffer is not on any list */ diff --cc module/zfs/lzjb.c index 4132406bd,10952f472..192d2c38d --- a/module/zfs/lzjb.c +++ b/module/zfs/lzjb.c @@@ -51,11 -51,11 +51,11 @@@ lzjb_compress(void *s_start, void *d_st { uchar_t *src = s_start; uchar_t *dst = d_start; - uchar_t *cpy, *copymap; + uchar_t *cpy, *copymap = NULL; int copymask = 1 << (NBBY - 1); - int mlen, offset; + int mlen, offset, hash; uint16_t *hp; - uint16_t lempel[LEMPEL_SIZE]; /* uninitialized; see above */ + uint16_t lempel[LEMPEL_SIZE] = { 0 }; while (src < (uchar_t *)s_start + s_len) { if ((copymask <<= 1) == (1 << NBBY)) { diff --cc module/zfs/spa.c index d4522a191,d7c5de0d3..2d0f0bfc4 --- a/module/zfs/spa.c +++ b/module/zfs/spa.c @@@ -3186,8 -3839,9 +3839,9 @@@ spa_vdev_detach(spa_t *spa, uint64_t gu vdev_t *rvd = spa->spa_root_vdev; vdev_t *vd, *pvd, *cvd, *tvd; boolean_t unspare = B_FALSE; - uint64_t unspare_guid; + uint64_t unspare_guid = 0; size_t len; + char *vdpath; txg = spa_vdev_enter(spa);