
patchbot at xen
Aug 1, 2012, 2:11 PM
Views: 33
Permalink
|
|
[xen-unstable] libxl: fix unitialized variables in libxl__primary_console_find
|
|
# HG changeset patch # User Olaf Hering <olaf [at] aepfle> # Date 1343821609 -3600 # Node ID c379e77870aff938ca941a3acb760831039c19a6 # Parent 433624c658af4f3bf21ae53ef090528e870fdf58 libxl: fix unitialized variables in libxl__primary_console_find gcc 4.5 as shipped with openSuSE 11.4 does not recognize the case of LIBXL_DOMAIN_TYPE_INVALID properly: cc1: warnings being treated as errors libxl.c: In function 'libxl_primary_console_exec': libxl.c:1408:14: error: 'domid' may be used uninitialized in this function libxl.c:1409:9: error: 'cons_num' may be used uninitialized in this function libxl.c:1410:24: error: 'type' may be used uninitialized in this function libxl.c: In function 'libxl_primary_console_get_tty': libxl.c:1421:14: error: 'domid' may be used uninitialized in this function libxl.c:1422:9: error: 'cons_num' may be used uninitialized in this function libxl.c:1423:24: error: 'type' may be used uninitialized in this function make[3]: *** [libxl.o] Error 1 Fix this by adding a default case. Signed-off-by: Olaf Hering <olaf [at] aepfle> Acked-by: Ian Campbell <ian.campbell [at] citrix> Committed-by: Ian Campbell <ian.campbell [at] citrix> --- diff -r 433624c658af -r c379e77870af tools/libxl/libxl.c --- a/tools/libxl/libxl.c Wed Aug 01 12:46:48 2012 +0100 +++ b/tools/libxl/libxl.c Wed Aug 01 12:46:49 2012 +0100 @@ -1590,6 +1590,7 @@ static int libxl__primary_console_find(l case LIBXL_DOMAIN_TYPE_INVALID: rc = ERROR_INVAL; goto out; + default: abort(); } } _______________________________________________ Xen-changelog mailing list Xen-changelog [at] lists http://lists.xensource.com/xen-changelog
|