Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:olh:xen-4.3
xen
xen.block-qcow.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File xen.block-qcow.patch of Package xen
[ 113s] block-qcow.c: In function 'get_cluster_offset.constprop': [ 113s] block-qcow.c:399:12: error: 'tmp_ptr' may be used uninitialized in this function [-Werror=maybe-uninitialized] [ 113s] uint64_t *tmp_ptr; [ 113s] ^ [ 113s] block-qcow.c:623:3: error: 'tmp_ptr2' may be used uninitialized in this function [-Werror=maybe-uninitialized] [ 113s] free(tmp_ptr2); [ 113s] ^ --- tools/blktap/drivers/block-qcow.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) Index: xen-4.3.4.9/tools/blktap/drivers/block-qcow.c =================================================================== --- xen-4.3.4.9.orig/tools/blktap/drivers/block-qcow.c +++ xen-4.3.4.9/tools/blktap/drivers/block-qcow.c @@ -395,8 +395,8 @@ static uint64_t get_cluster_offset(struc int n_start, int n_end) { int min_index, i, j, l1_index, l2_index, l2_sector, l1_sector; - char *tmp_ptr2, *l2_ptr, *l1_ptr; - uint64_t *tmp_ptr; + char *tmp_ptr2 = NULL, *l2_ptr, *l1_ptr; + uint64_t *tmp_ptr = NULL; uint64_t l2_offset, *l2_table, cluster_offset, tmp; uint32_t min_count; int new_l2_table; @@ -440,6 +440,7 @@ static uint64_t get_cluster_offset(struc if (posix_memalign((void **)&tmp_ptr, 4096, 4096) != 0) { DPRINTF("ERROR allocating memory for L1 table\n"); + return 0; } memcpy(tmp_ptr, l1_ptr, 4096); @@ -613,6 +614,7 @@ found: if (posix_memalign((void **)&tmp_ptr2, 4096, 4096) != 0) { DPRINTF("ERROR allocating memory for L1 table\n"); + return 0; } memcpy(tmp_ptr2, l2_ptr, 4096); lseek(s->fd, l2_offset + (l2_sector << 12), SEEK_SET);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor