[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] blktap2: initialise buf in qcow2raw.c:main
commit 75529048f4e81edf4b6af54418976f93a9b90e02 Author: Wei Liu <wei.liu2@xxxxxxxxxx> AuthorDate: Fri Apr 29 16:11:17 2016 +0100 Commit: Wei Liu <wei.liu2@xxxxxxxxxx> CommitDate: Fri May 6 15:50:33 2016 +0100 blktap2: initialise buf in qcow2raw.c:main Gcc complains: qcow2raw.c: In function â??mainâ??: qcow2raw.c:387:17: error: â??bufâ?? may be used uninitialized in this function [-Werror=maybe-uninitialized] treq.buf = buf; ^ But buf is a valid buffer allocated by posix_memalign at that point. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> Reviewed-by: Doug Goldstein <cardoe@xxxxxxxxxx> Release-acked-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- tools/blktap2/drivers/qcow2raw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/blktap2/drivers/qcow2raw.c b/tools/blktap2/drivers/qcow2raw.c index a2e417d..5ad7305 100644 --- a/tools/blktap2/drivers/qcow2raw.c +++ b/tools/blktap2/drivers/qcow2raw.c @@ -202,7 +202,7 @@ int main(int argc, const char *argv[]) uint64_t size; struct timeval timeout; uint64_t i; - char *buf; + char *buf = NULL; struct stat finfo; td_request_t treq; td_vbd_request_t* vreq; -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |