summaryrefslogtreecommitdiff
path: root/common/cmd_doc.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2005-10-13 16:45:02 +0200
committerWolfgang Denk <wd@pollux.denx.de>2005-10-13 16:45:02 +0200
commit77ddac9480d63a80b6bb76d7ee4dcc2d1070867e (patch)
treee9563b2f28ea59062b90bb5712f141e8e9798aee /common/cmd_doc.c
parent17a8b276ba2b3499b75cd60b0b5289dbbea7967b (diff)
downloadu-boot-imx-77ddac9480d63a80b6bb76d7ee4dcc2d1070867e.zip
u-boot-imx-77ddac9480d63a80b6bb76d7ee4dcc2d1070867e.tar.gz
u-boot-imx-77ddac9480d63a80b6bb76d7ee4dcc2d1070867e.tar.bz2
Cleanup for GCC-4.x
Diffstat (limited to 'common/cmd_doc.c')
-rw-r--r--common/cmd_doc.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/common/cmd_doc.c b/common/cmd_doc.c
index e5db1bc..5e9bea3 100644
--- a/common/cmd_doc.c
+++ b/common/cmd_doc.c
@@ -143,7 +143,7 @@ int do_doc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
cmd ? "read" : "write", curr_device, off, size);
ret = doc_rw(doc_dev_desc + curr_device, cmd, off, size,
- &total, (u_char*)addr);
+ (size_t *)&total, (u_char*)addr);
printf ("%d bytes %s: %s\n", total, cmd ? "read" : "write",
ret ? "ERROR" : "OK");
@@ -304,12 +304,12 @@ int doc_rw (struct DiskOnChip* this, int cmd,
if (cmd)
ret = doc_read_ecc(this, from, len,
- &n, (u_char*)buf,
- noecc ? NULL : eccbuf);
+ (size_t *)&n, (u_char*)buf,
+ noecc ? (uchar *)NULL : (uchar *)eccbuf);
else
ret = doc_write_ecc(this, from, len,
- &n, (u_char*)buf,
- noecc ? NULL : eccbuf);
+ (size_t *)&n, (u_char*)buf,
+ noecc ? (uchar *)NULL : (uchar *)eccbuf);
if (ret)
break;
@@ -804,7 +804,7 @@ static int find_boot_record(struct NFTLrecord *nftl)
/* Check for ANAND header first. Then can whinge if it's found but later
checks fail */
if ((ret = doc_read_ecc(nftl->mtd, block * nftl->EraseSize, SECTORSIZE,
- &retlen, buf, NULL))) {
+ (size_t *)&retlen, buf, NULL))) {
static int warncount = 5;
if (warncount) {
@@ -829,7 +829,7 @@ static int find_boot_record(struct NFTLrecord *nftl)
/* To be safer with BIOS, also use erase mark as discriminant */
if ((ret = doc_read_oob(nftl->mtd, block * nftl->EraseSize + SECTORSIZE + 8,
- 8, &retlen, (char *)&h1) < 0)) {
+ 8, (size_t *)&retlen, (uchar *)&h1) < 0)) {
#ifdef NFTL_DEBUG
printf("ANAND header found at 0x%x, but OOB data read failed\n",
block * nftl->EraseSize);
@@ -902,7 +902,7 @@ static int find_boot_record(struct NFTLrecord *nftl)
/* read one sector for every SECTORSIZE of blocks */
if ((ret = doc_read_ecc(nftl->mtd, block * nftl->EraseSize +
i + SECTORSIZE, SECTORSIZE,
- &retlen, buf, (char *)&oob)) < 0) {
+ (size_t *)&retlen, buf, (uchar *)&oob)) < 0) {
puts ("Read of bad sector table failed\n");
return -1;
}