All of lore.kernel.org
 help / color / mirror / Atom feed
From: Flavio Leitner <fbl@conectiva.com.br>
To: xen-devel <xen-devel@lists.xensource.com>
Subject: gcc-4.0 - get_header
Date: Fri, 24 Jun 2005 15:01:35 -0300	[thread overview]
Message-ID: <20050624180135.GF3577@conectiva.com.br> (raw)


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]

                 reply	other threads:[~2005-06-24 18:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050624180135.GF3577@conectiva.com.br \
    --to=fbl@conectiva.com.br \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.