summaryrefslogtreecommitdiff
path: root/kexec/kexec-elf.c
diff options
context:
space:
mode:
authorMohan <mohan@in.ibm.com>2006-07-27 11:16:39 -0600
committerEric W. Biederman <ebiederm@xmission.com>2006-07-27 11:16:39 -0600
commit742b147db61c45cc00db63eea7b23d0a462e56c8 (patch)
tree241f8411f101176ae6a02163641891371a75c42c /kexec/kexec-elf.c
parentad0f10320e3393d7ca699ac5bcc81726994220c7 (diff)
Cleanup the warnings in gcc-4.1.0 compilation
Cleanup the warnings generated in GCC 4.1.0 compilation of kexec-tools. This patch is created on top of the following level of kexec-tools: - kexec-tools-1.101.tar.gz (from eric biederman's site or from lse site) - kexec-tools-1.101-kdump6.patch (consolidated patch posted on http://lse.sourceforge.net/kdump/patches/1.101-kdump6/kexec-tools-1.101-kdump6.patch) Review and suggestions are welcome. Note: Resending the patch since its not delivered to both fastboot and linuxppc64-dev mailing list. Regards, Mohan. Signed-off-by: Mohan <mohan@in.ibm.com> Signed-off-by: Maneesh Soni <maneesh@in.ibm.com>
Diffstat (limited to 'kexec/kexec-elf.c')
-rw-r--r--kexec/kexec-elf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kexec/kexec-elf.c b/kexec/kexec-elf.c
index 021bca9..da2c788 100644
--- a/kexec/kexec-elf.c
+++ b/kexec/kexec-elf.c
@@ -648,7 +648,7 @@ static int build_mem_shdrs(const char *buf, off_t len, struct mem_ehdr *ehdr)
return -1;
}
/* Remember where the section lives in the buffer */
- shdr->sh_data = buf + shdr->sh_offset;
+ shdr->sh_data = (unsigned char *)(buf + shdr->sh_offset);
}
return 0;
}
@@ -672,7 +672,7 @@ static int build_mem_notes(const char *buf, off_t len, struct mem_ehdr *ehdr)
for(i = 0; !note_start && (i < ehdr->e_phnum); i++) {
struct mem_phdr *phdr = &ehdr->e_phdr[i];
if (phdr->p_type == PT_NOTE) {
- note_start = phdr->p_data;
+ note_start = (unsigned char *)phdr->p_data;
note_end = note_start + phdr->p_filesz;
}
}
@@ -713,7 +713,7 @@ static int build_mem_notes(const char *buf, off_t len, struct mem_ehdr *ehdr)
die("Note name is not null termiated");
}
ehdr->e_note[i].n_type = hdr.n_type;
- ehdr->e_note[i].n_name = name;
+ ehdr->e_note[i].n_name = (char *)name;
ehdr->e_note[i].n_desc = desc;
ehdr->e_note[i].n_descsz = hdr.n_descsz;