Skip to contentSkip to conversation

tools: Fix build failure with gcc 4.4.3-4ubuntu5

PATCH In review George Dunlap 3 participants 3 messages May 16, 2011 – May 20, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools: Fix build failure with gcc 4.4.3-4ubuntu5

c/s 23253:a3db6b91f32d causes build failure with gcc 4.4.3-4ubuntu5, as the compiler can't figure out that the value returned is always a string literal.

tools/libxl/libxl_dm.c +1 -1
diff -r f9bb0bbea7c2 -r 19736875b3ab tools/libxl/libxl_dm.c
@@ -773,7 +773,7 @@ int libxl__create_device_model(libxl__gc
     path = libxl__sprintf(gc, "/local/domain/%d/hvmloader", info->domid);
     xs_mkdir(ctx->xsh, XBT_NULL, path);
     libxl__xs_write(gc, XBT_NULL, libxl__sprintf(gc, "%s/bios", path),
-                    libxl__domain_bios(gc, info));
+                    "%s", libxl__domain_bios(gc, info));
 
     path = libxl__sprintf(gc, "/local/domain/0/device-model/%d", info->domid);
     xs_mkdir(ctx->xsh, XBT_NULL, path);
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · George Dunlap

c/s 23253:a3db6b91f32d causes build failure with gcc 4.4.3-4ubuntu5, as the compiler can't figure out that the value returned is always a string literal.

Quoted 17 lines

diff -r f9bb0bbea7c2 -r 19736875b3ab tools/libxl/libxl_dm.c

tools/libxl/libxl_dm.c +1 -1
@@ -773,7 +773,7 @@ int libxl__create_device_model(libxl__gc
     path = libxl__sprintf(gc, "/local/domain/%d/hvmloader", info->domid);
     xs_mkdir(ctx->xsh, XBT_NULL, path);
     libxl__xs_write(gc, XBT_NULL, libxl__sprintf(gc, "%s/bios", path),
-                    libxl__domain_bios(gc, info));
+                    "%s", libxl__domain_bios(gc, info));
 
     path = libxl__sprintf(gc, "/local/domain/0/device-model/%d", info->domid);
     xs_mkdir(ctx->xsh, XBT_NULL, path);

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel