All of lore.kernel.org
 help / color / mirror / Atom feed
* gcc-4.0 - get_header
@ 2005-06-24 18:01 Flavio Leitner
  0 siblings, 0 replies; only message in thread
From: Flavio Leitner @ 2005-06-24 18:01 UTC (permalink / raw)
  To: xen-devel


Hello!

get_header() use image as unsigned char and must be that way
because of operations with bit shifting but gcc4 dislike it.

----

signedness fix for gcc-4.0
(get_header)

Signed-off-by: Flavio B. Leitner <fbl@conectiva.com.br>


===== tools/libxc/xc_load_aout9.c 1.1 vs edited =====
--- 1.1/tools/libxc/xc_load_aout9.c	2005-06-24 06:51:37 -04:00
+++ edited/tools/libxc/xc_load_aout9.c	2005-06-24 10:33:30 -04:00
@@ -30,7 +30,7 @@ probe_aout9(
 {
     struct Exec ehdr;
 
-    if (!get_header(image, image_size, &ehdr)) {
+    if (!get_header((unsigned char *) image, image_size, &ehdr)) {
         ERROR("Kernel image does not have a a.out9 header.");
         return -EINVAL;
     }
@@ -49,7 +49,7 @@ parseaout9image(
     struct Exec ehdr;
     unsigned long start, txtsz, end;
 
-    if (!get_header(image, image_size, &ehdr)) {
+    if (!get_header((unsigned char *) image, image_size, &ehdr)) {
         ERROR("Kernel image does not have a a.out9 header.");
         return -EINVAL;
     }
@@ -85,7 +85,7 @@ loadaout9image(
     struct Exec ehdr;
     unsigned long txtsz;
 
-    if (!get_header(image, image_size, &ehdr)) {
+    if (!get_header((unsigned char *) image, image_size, &ehdr)) {
         ERROR("Kernel image does not have a a.out9 header.");
         return -EINVAL;
     }

-- 
Flávio Bruno Leitner <fbl@conectiva.com.br>
[0EA2 7F40 4CF4 1E63 4AF6  33C0 3E10 E205 F251 EDDA]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-06-24 18:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-24 18:01 gcc-4.0 - get_header Flavio Leitner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.