From: Jesse Millan <jessem@cs.pdx.edu>
To: kernel-janitors@vger.kernel.org
Subject: [KJ] [PATCH] [RESEND] Silence GCC4 warning: pointer targets in
Date: Wed, 29 Jun 2005 03:19:10 +0000 [thread overview]
Message-ID: <42C2132E.7000102@cs.pdx.edu> (raw)
[-- Attachment #1: Type: text/plain, Size: 2 bytes --]
[-- Attachment #2: misc-patch.patch --]
[-- Type: text/x-diff, Size: 1728 bytes --]
Signed-off-by: Jesse Millan <jessem@cs.pdx.edu>
GCC4 compares signedness of all pointer types. Assigning an unsigned
pointer to a signed pointer (or vise-versa) generates a warning. In this
case an unsigned char pointer was assigned the value of a signed char
pointer. It looks like the author was aware of this so I just let it be.
An explicit cast silences the warnings.
---
diff -puN arch/x86_64/boot/compressed/misc.c~misc-patch arch/x86_64/boot/compressed/misc.c
--- linux-2.6.12-rc6.git10.kj.gcc4/arch/x86_64/boot/compressed/misc.c~misc-patch 2005-06-28 18:49:10.152280992 -0700
+++ linux-2.6.12-rc6.git10.kj.gcc4-root/arch/x86_64/boot/compressed/misc.c 2005-06-28 18:53:11.512588648 -0700
@@ -222,7 +222,7 @@ static int fill_inbuf(void)
error("ran out of input data");
}
- inbuf = input_data;
+ inbuf = (uch *)input_data;
insize = input_len;
inptr = 1;
return inbuf[0];
@@ -288,7 +288,7 @@ void setup_normal_output_buffer(void)
#else
if ((ALT_MEM_K > EXT_MEM_K ? ALT_MEM_K : EXT_MEM_K) < 1024) error("Less than 2MB of memory");
#endif
- output_data = (char *)__PHYSICAL_START; /* Normally Points to 1M */
+ output_data = (uch *)__PHYSICAL_START; /* Normally Points to 1M */
free_mem_end_ptr = (long)real_mode;
}
@@ -305,7 +305,7 @@ void setup_output_buffer_if_we_run_high(
#else
if ((ALT_MEM_K > EXT_MEM_K ? ALT_MEM_K : EXT_MEM_K) < (3*1024)) error("Less than 4MB of memory");
#endif
- mv->low_buffer_start = output_data = (char *)LOW_BUFFER_START;
+ mv->low_buffer_start = output_data = (uch *)LOW_BUFFER_START;
low_buffer_end = ((unsigned int)real_mode > LOW_BUFFER_MAX
? LOW_BUFFER_MAX : (unsigned int)real_mode) & ~0xfff;
low_buffer_size = low_buffer_end - LOW_BUFFER_START;
_
[-- Attachment #3: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
reply other threads:[~2005-06-29 3:19 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=42C2132E.7000102@cs.pdx.edu \
--to=jessem@cs.pdx.edu \
--cc=kernel-janitors@vger.kernel.org \
/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.