diff options
author | Wolfgang Denk <wd@pollux.denx.de> | 2005-10-13 16:45:02 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@pollux.denx.de> | 2005-10-13 16:45:02 +0200 |
commit | 77ddac9480d63a80b6bb76d7ee4dcc2d1070867e (patch) | |
tree | e9563b2f28ea59062b90bb5712f141e8e9798aee /fs/jffs2 | |
parent | 17a8b276ba2b3499b75cd60b0b5289dbbea7967b (diff) | |
download | bootable_bootloader_goldelico_gta04-77ddac9480d63a80b6bb76d7ee4dcc2d1070867e.zip bootable_bootloader_goldelico_gta04-77ddac9480d63a80b6bb76d7ee4dcc2d1070867e.tar.gz bootable_bootloader_goldelico_gta04-77ddac9480d63a80b6bb76d7ee4dcc2d1070867e.tar.bz2 |
Cleanup for GCC-4.x
Diffstat (limited to 'fs/jffs2')
-rw-r--r-- | fs/jffs2/compr_rubin.c | 8 | ||||
-rw-r--r-- | fs/jffs2/jffs2_1pass.c | 18 |
2 files changed, 14 insertions, 12 deletions
diff --git a/fs/jffs2/compr_rubin.c b/fs/jffs2/compr_rubin.c index cf01f88..74577d9 100644 --- a/fs/jffs2/compr_rubin.c +++ b/fs/jffs2/compr_rubin.c @@ -48,8 +48,8 @@ void rubin_do_decompress(unsigned char *bits, unsigned char *in, unsigned char *page_out, __u32 destlen) { - register char *curr = page_out; - char *end = page_out + destlen; + register char *curr = (char *)page_out; + char *end = (char *)(page_out + destlen); register unsigned long temp; register unsigned long result; register unsigned long p; @@ -85,8 +85,10 @@ void rubin_do_decompress(unsigned char *bits, unsigned char *in, rec_q <<= 1; rec_q |= (temp >> (bit++ ^ 7)) & 1; if (bit > 31) { + u32 *p = (u32 *)in; bit = 0; - temp = *(++((u32 *) in)); + temp = *(++p); + in = (unsigned char *)p; } } i0 = (bits[i] * p) >> 8; diff --git a/fs/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c index e53aa31..b621e6a 100644 --- a/fs/jffs2/jffs2_1pass.c +++ b/fs/jffs2/jffs2_1pass.c @@ -496,7 +496,7 @@ static int compare_dirents(struct b_node *new, struct b_node *old) /* length is also the same, so use ascending sort by name */ - cmp = strncmp(jNew->name, jOld->name, jNew->nsize); + cmp = strncmp((char *)jNew->name, (char *)jOld->name, jNew->nsize); if (cmp != 0) return cmp > 0; @@ -572,8 +572,8 @@ jffs2_1pass_read_inode(struct b_lists *pL, u32 inode, char *dest) struct jffs2_raw_inode *jNode; u32 totalSize = 0; u32 latestVersion = 0; - char *lDest; - char *src; + uchar *lDest; + uchar *src; long ret; int i; u32 counter = 0; @@ -624,14 +624,14 @@ jffs2_1pass_read_inode(struct b_lists *pL, u32 inode, char *dest) #endif if(dest) { - src = ((char *) jNode) + sizeof(struct jffs2_raw_inode); + src = ((uchar *) jNode) + sizeof(struct jffs2_raw_inode); /* ignore data behind latest known EOF */ if (jNode->offset > totalSize) { put_fl_mem(jNode); continue; } - lDest = (char *) (dest + jNode->offset); + lDest = (uchar *) (dest + jNode->offset); #if 0 putLabeledWord("read_inode: src = ", src); putLabeledWord("read_inode: dest = ", lDest); @@ -709,7 +709,7 @@ jffs2_1pass_find_inode(struct b_lists * pL, const char *name, u32 pino) jDir = (struct jffs2_raw_dirent *) get_node_mem(b->offset); if ((pino == jDir->pino) && (len == jDir->nsize) && (jDir->ino) && /* 0 for unlink */ - (!strncmp(jDir->name, name, len))) { /* a match */ + (!strncmp((char *)jDir->name, name, len))) { /* a match */ if (jDir->version < version) { put_fl_mem(jDir); continue; @@ -776,7 +776,7 @@ static inline void dump_stat(struct stat *st, const char *name) if (st->st_mtime == (time_t)(-1)) /* some ctimes really hate -1 */ st->st_mtime = 1; - ctime_r(&st->st_mtime, s/*,64*/); /* newlib ctime doesn't have buflen */ + ctime_r((time_t *)&st->st_mtime, s/*,64*/); /* newlib ctime doesn't have buflen */ if ((p = strchr(s,'\n')) != NULL) *p = '\0'; if ((p = strchr(s,'\r')) != NULL) *p = '\0'; @@ -796,7 +796,7 @@ static inline u32 dump_inode(struct b_lists * pL, struct jffs2_raw_dirent *d, st if(!d || !i) return -1; - strncpy(fname, d->name, d->nsize); + strncpy(fname, (char *)d->name, d->nsize); fname[d->nsize] = '\0'; memset(&st,0,sizeof(st)); @@ -971,7 +971,7 @@ jffs2_1pass_resolve_inode(struct b_lists * pL, u32 ino) putnstr(src, jNode->dsize); putstr("\r\n"); #endif - strncpy(tmp, src, jNode->dsize); + strncpy(tmp, (char *)src, jNode->dsize); tmp[jNode->dsize] = '\0'; put_fl_mem(jNode); break; |