Files
xen/tools/blktap2/drivers
Dario Faggioli c591613f8c blktap2: Fix two 'maybe uninitialized' variables
for which gcc 4.9.0 complains about, like this:

block-qcow.c: In function `get_cluster_offset':
block-qcow.c:431:3: error: `tmp_ptr' may be used uninitialized in this function
[-Werror=maybe-uninitialized]
   memcpy(tmp_ptr, l1_ptr, 4096);
   ^
block-qcow.c:606:7: error: `tmp_ptr2' may be used uninitialized in this
function [-Werror=maybe-uninitialized]
   if (write(s->fd, tmp_ptr2, 4096) != 4096) {
       ^
cc1: all warnings being treated as errors
/home/dario/Sources/xen/xen/xen.git/tools/blktap2/drivers/../../../tools/Rules.mk:89:
 recipe for target 'block-qcow.o' failed
make[5]: *** [block-qcow.o] Error 1

The proper behavior is to return upon allocation failure.
About what to return, 0 seems the best option, looking
at both the function and the call sites.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
(cherry picked from commit 345e44a85d)
(cherry picked from commit 5e39eb05aa)
2014-07-02 15:38:24 +01:00
..
2009-06-23 17:24:14 +01:00
2009-11-23 06:42:12 +00:00
2009-11-09 19:45:06 +00:00
2009-11-09 19:45:06 +00:00
2009-06-24 11:16:42 +01:00
2012-05-10 11:22:18 +01:00
2012-01-26 12:46:26 +00:00
2012-01-26 12:46:26 +00:00