diff options
author | Olaf Hering <olaf@aepfle.de> | 2012-08-01 12:46:49 +0100 |
---|---|---|
committer | Olaf Hering <olaf@aepfle.de> | 2012-08-01 12:46:49 +0100 |
commit | fe074860b5daaa6e0943a92209c999bf476c0ce6 (patch) | |
tree | 743f6e5f62296a0f6e2bb57ec0cbee9dcf733711 /tools | |
parent | 14b47731eaad8472858b712ee3899b3d15e24b92 (diff) | |
download | xen-fe074860b5daaa6e0943a92209c999bf476c0ce6.tar.gz xen-fe074860b5daaa6e0943a92209c999bf476c0ce6.tar.bz2 xen-fe074860b5daaa6e0943a92209c999bf476c0ce6.zip |
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@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/libxl/libxl.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 00ddc0ec80..726a70ebb0 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -1590,6 +1590,7 @@ static int libxl__primary_console_find(libxl_ctx *ctx, uint32_t domid_vm, case LIBXL_DOMAIN_TYPE_INVALID: rc = ERROR_INVAL; goto out; + default: abort(); } } |