diff -r -u5 -N -x CVS -x '*~' -x '.#*' /cvs-tempo/checkout-ecoscentric/ecos/packages/fs/jffs2/current/ChangeLog /cvs-tempo/checkout-ecoscentric-devoted/ecos/packages/fs/jffs2/current/ChangeLog
--- /cvs-tempo/checkout-ecoscentric/ecos/packages/fs/jffs2/current/ChangeLog	2005-08-03 22:39:51.000000000 +0200
+++ /cvs-tempo/checkout-ecoscentric-devoted/ecos/packages/fs/jffs2/current/ChangeLog	2005-09-02 11:25:28.000000000 +0200
@@ -1,5 +1,18 @@
+2005-09-02  Sebastien Couret <sebastien.couret@elios-informatique.fr>
+
+	* src/compr_rubin.c: Silent gcc4 signedness warnings 
+	* src/erase.c      : Silent gcc4 warnings 
+	* src/flashio.c    : Silent gcc4 warnings
+	* src/gc.c         : Silent gcc4 signedness warnings
+	* src/nodelist.c   : Silent gcc4 warnings
+	* src/nodemgmt.c   : Silent gcc4 signedness warnings
+	* src/pushpull.h   : Silent gcc4 signedness warnings
+	* src/read.c       : Silent gcc4 signedness warnings
+	* src/readinode.c  : Silent gcc4 warnings
+	* src/write.c      : Silent gcc4 signedness warnings
+	
 2005-08-03  Andrew Lunn  <andrew.lunn@ascom.ch>
 
 	* tests/jffs2_1.c: Include <stdio.h> to stop compiler warning.
 
 2005-07-30  Andrew Lunn  <andrew.lunn@ascom.ch>
diff -r -u5 -N -x CVS -x '*~' -x '.#*' /cvs-tempo/checkout-ecoscentric/ecos/packages/fs/jffs2/current/src/compr_rubin.c /cvs-tempo/checkout-ecoscentric-devoted/ecos/packages/fs/jffs2/current/src/compr_rubin.c
--- /cvs-tempo/checkout-ecoscentric/ecos/packages/fs/jffs2/current/src/compr_rubin.c	2005-07-30 17:30:42.000000000 +0200
+++ /cvs-tempo/checkout-ecoscentric-devoted/ecos/packages/fs/jffs2/current/src/compr_rubin.c	2005-09-02 11:16:33.000000000 +0200
@@ -193,11 +193,11 @@
 	{
 	int outpos = 0;
 	int pos=0;
 	struct rubin_state rs;
 
-	init_pushpull(&rs.pp, cpage_out, *dstlen * 8, 0, 32);
+	init_pushpull(&rs.pp,(char*) cpage_out, *dstlen * 8, 0, 32);
 
 	init_rubin(&rs, bit_divider, bits);
 	
 	while (pos < (*sourcelen) && !out_byte(&rs, data_in[pos]))
 		pos++;
@@ -297,11 +297,11 @@
 			 unsigned char *page_out, uint32_t srclen, uint32_t destlen)
 {
 	int outpos = 0;
 	struct rubin_state rs;
 	
-	init_pushpull(&rs.pp, cdata_in, srclen, 0, 0);
+	init_pushpull(&rs.pp, (char *)cdata_in, srclen, 0, 0);
 	init_decode(&rs, bit_divider, bits);
 	
 	while (outpos < destlen) {
 		page_out[outpos++] = in_byte(&rs);
 	}
diff -r -u5 -N -x CVS -x '*~' -x '.#*' /cvs-tempo/checkout-ecoscentric/ecos/packages/fs/jffs2/current/src/erase.c /cvs-tempo/checkout-ecoscentric-devoted/ecos/packages/fs/jffs2/current/src/erase.c
--- /cvs-tempo/checkout-ecoscentric/ecos/packages/fs/jffs2/current/src/erase.c	2005-07-30 17:30:42.000000000 +0200
+++ /cvs-tempo/checkout-ecoscentric-devoted/ecos/packages/fs/jffs2/current/src/erase.c	2005-09-02 11:14:07.000000000 +0200
@@ -331,11 +331,11 @@
 			printk(KERN_WARNING "Short read from newly-erased block at 0x%08x. Wanted %d, got %zd\n", ofs, readlen, retlen);
 			goto fail;
 		}
 		for (i=0; i<readlen; i += sizeof(unsigned long)) {
 			/* It's OK. We know it's properly aligned */
-			unsigned long *datum = ebuf + i;
+			unsigned long *datum = (unsigned long *)((char*) ebuf + i);
 			if (*datum + 1) {
 				*bad_offset += i;
 				printk(KERN_WARNING "Newly-erased block contained word 0x%lx at offset 0x%08x\n", *datum, *bad_offset);
 				goto fail;
 			}
@@ -352,11 +352,11 @@
 static void jffs2_mark_erased_block(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb)
 {
 	struct jffs2_raw_node_ref *marker_ref = NULL;
 	size_t retlen;
 	int ret;
-	uint32_t bad_offset;
+	uint32_t bad_offset=0;
 
 	switch (jffs2_block_check_erase(c, jeb, &bad_offset)) {
 	case -EAGAIN:	goto refile;
 	case -EIO:	goto filebad;
 	}
diff -r -u5 -N -x CVS -x '*~' -x '.#*' /cvs-tempo/checkout-ecoscentric/ecos/packages/fs/jffs2/current/src/flashio.c /cvs-tempo/checkout-ecoscentric-devoted/ecos/packages/fs/jffs2/current/src/flashio.c
--- /cvs-tempo/checkout-ecoscentric/ecos/packages/fs/jffs2/current/src/flashio.c	2005-07-30 17:30:42.000000000 +0200
+++ /cvs-tempo/checkout-ecoscentric-devoted/ecos/packages/fs/jffs2/current/src/flashio.c	2005-09-02 10:51:29.000000000 +0200
@@ -99,11 +99,11 @@
 					       vecs[j].iov_len);
 					cbufptr += vecs[j].iov_len;
 				}
 				ret =
 				    jffs2_flash_write(c, to, sizetomalloc,
-						      &thislen, cbuf);
+						      &thislen,(unsigned char *) cbuf);
 				if (thislen > totvecsize)	// in case it was aligned up
 					thislen = totvecsize;
 				totlen += thislen;
 				free(cbuf);
 				goto writev_out;
@@ -118,11 +118,11 @@
 				lentowrite &= ~(sizeof (int) - 1);
 				memcpy(buf, vecs[i].iov_base, lentowrite);
 
 				ret =
 				    jffs2_flash_write(c, to, lentowrite,
-						      &thislen, (char *) &buf);
+						      &thislen, (unsigned char *) &buf);
 				if (thislen > vecs[i].iov_len)
 					thislen = vecs[i].iov_len;
 			}	// else
 		} else
 			ret =
diff -r -u5 -N -x CVS -x '*~' -x '.#*' /cvs-tempo/checkout-ecoscentric/ecos/packages/fs/jffs2/current/src/gc.c /cvs-tempo/checkout-ecoscentric-devoted/ecos/packages/fs/jffs2/current/src/gc.c
--- /cvs-tempo/checkout-ecoscentric/ecos/packages/fs/jffs2/current/src/gc.c	2005-07-30 17:30:42.000000000 +0200
+++ /cvs-tempo/checkout-ecoscentric-devoted/ecos/packages/fs/jffs2/current/src/gc.c	2005-09-02 10:58:41.000000000 +0200
@@ -525,11 +525,11 @@
 
 	node = kmalloc(rawlen, GFP_KERNEL);
 	if (!node)
                return -ENOMEM;
 
-	ret = jffs2_flash_read(c, ref_offset(raw), rawlen, &retlen, (char *)node);
+	ret = jffs2_flash_read(c, ref_offset(raw), rawlen, &retlen, (unsigned char *)node);
 	if (!ret && retlen != rawlen)
 		ret = -EIO;
 	if (ret)
 		goto out_node;
 
@@ -592,11 +592,11 @@
  retry:
 	nraw->flash_offset = phys_ofs;
 	nraw->__totlen = rawlen;
 	nraw->next_phys = NULL;
 
-	ret = jffs2_flash_write(c, phys_ofs, rawlen, &retlen, (char *)node);
+	ret = jffs2_flash_write(c, phys_ofs, rawlen, &retlen, (unsigned char *)node);
 
 	if (ret || (retlen != rawlen)) {
 		printk(KERN_NOTICE "Write of %d bytes at 0x%08x failed. returned %d, retlen %zd\n",
                        rawlen, phys_ofs, ret, retlen);
 		if (retlen) {
@@ -689,11 +689,11 @@
 		mdata = kmalloc(fn->size, GFP_KERNEL);
 		if (!mdata) {
 			printk(KERN_WARNING "kmalloc of mdata failed in jffs2_garbage_collect_metadata()\n");
 			return -ENOMEM;
 		}
-		ret = jffs2_read_dnode(c, f, fn, mdata, 0, mdatalen);
+		ret = jffs2_read_dnode(c, f, fn,(unsigned char *)mdata, 0, mdatalen);
 		if (ret) {
 			printk(KERN_WARNING "read of old metadata failed in jffs2_garbage_collect_metadata(): %d\n", ret);
 			kfree(mdata);
 			return ret;
 		}
@@ -736,11 +736,11 @@
 	ri.dsize = cpu_to_je32(mdatalen);
 	ri.compr = JFFS2_COMPR_NONE;
 	ri.node_crc = cpu_to_je32(crc32(0, &ri, sizeof(ri)-8));
 	ri.data_crc = cpu_to_je32(crc32(0, mdata, mdatalen));
 
-	new_fn = jffs2_write_dnode(c, f, &ri, mdata, mdatalen, phys_ofs, ALLOC_GC);
+	new_fn = jffs2_write_dnode(c, f, &ri,( unsigned char *) mdata, mdatalen, phys_ofs, ALLOC_GC);
 
 	if (IS_ERR(new_fn)) {
 		printk(KERN_WARNING "Error writing new dnode: %ld\n", PTR_ERR(new_fn));
 		ret = PTR_ERR(new_fn);
 		goto out;
@@ -762,11 +762,11 @@
 	uint32_t alloclen, phys_ofs;
 	int ret;
 
 	rd.magic = cpu_to_je16(JFFS2_MAGIC_BITMASK);
 	rd.nodetype = cpu_to_je16(JFFS2_NODETYPE_DIRENT);
-	rd.nsize = strlen(fd->name);
+	rd.nsize = strlen((char*)fd->name);
 	rd.totlen = cpu_to_je32(sizeof(rd) + rd.nsize);
 	rd.hdr_crc = cpu_to_je32(crc32(0, &rd, sizeof(struct jffs2_unknown_node)-4));
 
 	rd.pino = cpu_to_je32(f->inocache->ino);
 	rd.version = cpu_to_je32(++f->highest_version);
@@ -806,11 +806,11 @@
 	if (!jffs2_can_mark_obsolete(c)) {
 		struct jffs2_raw_dirent *rd;
 		struct jffs2_raw_node_ref *raw;
 		int ret;
 		size_t retlen;
-		int name_len = strlen(fd->name);
+		int name_len = strlen((char*)fd->name);
 		uint32_t name_crc = crc32(0, fd->name, name_len);
 		uint32_t rawlen = ref_totlen(c, jeb, fd->raw);
 
 		rd = kmalloc(rawlen, GFP_KERNEL);
 		if (!rd)
@@ -838,11 +838,11 @@
 
 			D1(printk(KERN_DEBUG "Check potential deletion dirent at %08x\n", ref_offset(raw)));
 
 			/* This is an obsolete node belonging to the same directory, and it's of the right
 			   length. We need to take a closer look...*/
-			ret = jffs2_flash_read(c, ref_offset(raw), rawlen, &retlen, (char *)rd);
+			ret = jffs2_flash_read(c, ref_offset(raw), rawlen, &retlen, (unsigned char *)rd);
 			if (ret) {
 				printk(KERN_WARNING "jffs2_g_c_deletion_dirent(): Read error (%d) reading obsolete node at %08x\n", ret, ref_offset(raw));
 				/* If we can't read it, we don't need to continue to obsolete it. Continue */
 				continue;
 			}
@@ -918,11 +918,11 @@
 	if(fn->frags > 1) {
 		size_t readlen;
 		uint32_t crc;
 		/* It's partially obsoleted by a later write. So we have to 
 		   write it out again with the _same_ version as before */
-		ret = jffs2_flash_read(c, ref_offset(fn->raw), sizeof(ri), &readlen, (char *)&ri);
+		ret = jffs2_flash_read(c, ref_offset(fn->raw), sizeof(ri), &readlen, (unsigned char *)&ri);
 		if (readlen != sizeof(ri) || ret) {
 			printk(KERN_WARNING "Node read failed in jffs2_garbage_collect_hole. Ret %d, retlen %zd. Data will be lost by writing new hole node\n", ret, readlen);
 			goto fill;
 		}
 		if (je16_to_cpu(ri.nodetype) != JFFS2_NODETYPE_INODE) {
diff -r -u5 -N -x CVS -x '*~' -x '.#*' /cvs-tempo/checkout-ecoscentric/ecos/packages/fs/jffs2/current/src/nodelist.c /cvs-tempo/checkout-ecoscentric-devoted/ecos/packages/fs/jffs2/current/src/nodelist.c
--- /cvs-tempo/checkout-ecoscentric/ecos/packages/fs/jffs2/current/src/nodelist.c	2005-07-30 17:30:42.000000000 +0200
+++ /cvs-tempo/checkout-ecoscentric-devoted/ecos/packages/fs/jffs2/current/src/nodelist.c	2005-09-02 10:41:40.000000000 +0200
@@ -26,11 +26,11 @@
 	struct jffs2_full_dirent **prev = list;
 	
 	JFFS2_DBG_DENTLIST("add dirent \"%s\", ino #%u\n", new->name, new->ino);
 
 	while ((*prev) && (*prev)->nhash <= new->nhash) {
-		if ((*prev)->nhash == new->nhash && !strcmp((*prev)->name, new->name)) {
+		if ((*prev)->nhash == new->nhash && !strcmp((char*)(*prev)->name,(char*)new->name)) {
 			/* Duplicate. Free one */
 			if (new->version < (*prev)->version) {
 				JFFS2_DBG_DENTLIST("Eep! Marking new dirent node is obsolete, old is \"%s\", ino #%u\n",
 					(*prev)->name, (*prev)->ino);
 				jffs2_mark_node_obsolete(c, new->raw);
diff -r -u5 -N -x CVS -x '*~' -x '.#*' /cvs-tempo/checkout-ecoscentric/ecos/packages/fs/jffs2/current/src/nodemgmt.c /cvs-tempo/checkout-ecoscentric-devoted/ecos/packages/fs/jffs2/current/src/nodemgmt.c
--- /cvs-tempo/checkout-ecoscentric/ecos/packages/fs/jffs2/current/src/nodemgmt.c	2005-07-30 17:30:42.000000000 +0200
+++ /cvs-tempo/checkout-ecoscentric-devoted/ecos/packages/fs/jffs2/current/src/nodemgmt.c	2005-09-02 10:44:45.000000000 +0200
@@ -539,11 +539,11 @@
 	   and potentially put its eraseblock onto the erase_pending_list. Thus, we know that
 	   the block hasn't _already_ been erased, and that 'ref' itself hasn't been freed yet
 	   by jffs2_free_all_node_refs() in erase.c. Which is nice. */
 
 	D1(printk(KERN_DEBUG "obliterating obsoleted node at 0x%08x\n", ref_offset(ref)));
-	ret = jffs2_flash_read(c, ref_offset(ref), sizeof(n), &retlen, (char *)&n);
+	ret = jffs2_flash_read(c, ref_offset(ref), sizeof(n), &retlen, (unsigned char *)&n);
 	if (ret) {
 		printk(KERN_WARNING "Read error reading from obsoleted node at 0x%08x: %d\n", ref_offset(ref), ret);
 		goto out_erase_sem;
 	}
 	if (retlen != sizeof(n)) {
@@ -558,11 +558,11 @@
 		D1(printk(KERN_DEBUG "Node at 0x%08x was already marked obsolete (nodetype 0x%04x)\n", ref_offset(ref), je16_to_cpu(n.nodetype)));
 		goto out_erase_sem;
 	}
 	/* XXX FIXME: This is ugly now */
 	n.nodetype = cpu_to_je16(je16_to_cpu(n.nodetype) & ~JFFS2_NODE_ACCURATE);
-	ret = jffs2_flash_write(c, ref_offset(ref), sizeof(n), &retlen, (char *)&n);
+	ret = jffs2_flash_write(c, ref_offset(ref), sizeof(n), &retlen, (unsigned char *)&n);
 	if (ret) {
 		printk(KERN_WARNING "Write error in obliterating obsoleted node at 0x%08x: %d\n", ref_offset(ref), ret);
 		goto out_erase_sem;
 	}
 	if (retlen != sizeof(n)) {
diff -r -u5 -N -x CVS -x '*~' -x '.#*' /cvs-tempo/checkout-ecoscentric/ecos/packages/fs/jffs2/current/src/pushpull.h /cvs-tempo/checkout-ecoscentric-devoted/ecos/packages/fs/jffs2/current/src/pushpull.h
--- /cvs-tempo/checkout-ecoscentric/ecos/packages/fs/jffs2/current/src/pushpull.h	2005-01-22 18:14:49.000000000 +0100
+++ /cvs-tempo/checkout-ecoscentric-devoted/ecos/packages/fs/jffs2/current/src/pushpull.h	2005-09-02 11:15:02.000000000 +0200
@@ -24,11 +24,11 @@
 };
 
 
 static inline void init_pushpull(struct pushpull *pp, char *buf, unsigned buflen, unsigned ofs, unsigned reserve)
 {
-	pp->buf = buf;
+	pp->buf = (unsigned char*)buf;
 	pp->buflen = buflen;
 	pp->ofs = ofs;
 	pp->reserve = reserve;
 }
 
diff -r -u5 -N -x CVS -x '*~' -x '.#*' /cvs-tempo/checkout-ecoscentric/ecos/packages/fs/jffs2/current/src/read.c /cvs-tempo/checkout-ecoscentric-devoted/ecos/packages/fs/jffs2/current/src/read.c
--- /cvs-tempo/checkout-ecoscentric/ecos/packages/fs/jffs2/current/src/read.c	2005-07-30 17:30:42.000000000 +0200
+++ /cvs-tempo/checkout-ecoscentric-devoted/ecos/packages/fs/jffs2/current/src/read.c	2005-09-02 10:50:04.000000000 +0200
@@ -33,11 +33,11 @@
 
 	ri = jffs2_alloc_raw_inode();
 	if (!ri)
 		return -ENOMEM;
 
-	ret = jffs2_flash_read(c, ref_offset(fd->raw), sizeof(*ri), &readlen, (char *)ri);
+	ret = jffs2_flash_read(c, ref_offset(fd->raw), sizeof(*ri), &readlen, (unsigned char *)ri);
 	if (ret) {
 		jffs2_free_raw_inode(ri);
 		printk(KERN_WARNING "Error reading node from 0x%08x: %d\n", ref_offset(fd->raw), ret);
 		return ret;
 	}
diff -r -u5 -N -x CVS -x '*~' -x '.#*' /cvs-tempo/checkout-ecoscentric/ecos/packages/fs/jffs2/current/src/readinode.c /cvs-tempo/checkout-ecoscentric-devoted/ecos/packages/fs/jffs2/current/src/readinode.c
--- /cvs-tempo/checkout-ecoscentric/ecos/packages/fs/jffs2/current/src/readinode.c	2005-07-30 17:30:42.000000000 +0200
+++ /cvs-tempo/checkout-ecoscentric-devoted/ecos/packages/fs/jffs2/current/src/readinode.c	2005-09-02 10:49:24.000000000 +0200
@@ -475,11 +475,11 @@
 				JFFS2_ERROR("short read dirent at %#08x\n", ref_offset(ref));
 				err = -EIO;
 				goto free_out;
 			}
 
-			err = read_direntry(c, ref, &node.d, retlen, &ret_fd, latest_mctime, mctime_ver);
+			err = read_direntry(c, ref, &node.d, retlen, &ret_fd, (int32_t*)latest_mctime, mctime_ver);
 			if (err == 1) {
 				jffs2_mark_node_obsolete(c, ref);
 				break;
 			} else if (unlikely(err))
 				goto free_out;
@@ -496,11 +496,11 @@
 				JFFS2_ERROR("short read dnode at %#08x\n", ref_offset(ref));
 				err = -EIO;
 				goto free_out;
 			}
 
-			err = read_dnode(c, ref, &node.i, retlen, &ret_tn, latest_mctime, mctime_ver);
+			err = read_dnode(c, ref, &node.i, retlen, &ret_tn,(int32_t*)latest_mctime, mctime_ver);
 			if (err == 1) {
 				jffs2_mark_node_obsolete(c, ref);
 				break;
 			} else if (unlikely(err))
 				goto free_out;
@@ -548,11 +548,11 @@
 					struct jffs2_raw_inode *latest_node)
 {
 	struct jffs2_tmp_dnode_info *tn = NULL;
 	struct rb_root tn_list;
 	struct rb_node *rb, *repl_rb;
-	struct jffs2_full_dirent *fd_list;
+	struct jffs2_full_dirent *fd_list=NULL;
 	struct jffs2_full_dnode *fn = NULL;
 	uint32_t crc;
 	uint32_t latest_mctime, mctime_ver;
 	uint32_t mdata_ver = 0;
 	size_t retlen;
@@ -708,11 +708,11 @@
 				jffs2_do_clear_inode(c, f);
 				return -ENOMEM;
 			}
 			
 			ret = jffs2_flash_read(c, ref_offset(fn->raw) + sizeof(*latest_node),
-						je32_to_cpu(latest_node->csize), &retlen, (char *)f->target);
+						je32_to_cpu(latest_node->csize), &retlen, (unsigned char *)f->target);
 			
 			if (ret  || retlen != je32_to_cpu(latest_node->csize)) {
 				if (retlen != je32_to_cpu(latest_node->csize))
 					ret = -EIO;
 				kfree(f->target);
diff -r -u5 -N -x CVS -x '*~' -x '.#*' /cvs-tempo/checkout-ecoscentric/ecos/packages/fs/jffs2/current/src/write.c /cvs-tempo/checkout-ecoscentric-devoted/ecos/packages/fs/jffs2/current/src/write.c
--- /cvs-tempo/checkout-ecoscentric/ecos/packages/fs/jffs2/current/src/write.c	2005-07-30 17:30:42.000000000 +0200
+++ /cvs-tempo/checkout-ecoscentric-devoted/ecos/packages/fs/jffs2/current/src/write.c	2005-09-02 11:05:43.000000000 +0200
@@ -247,11 +247,11 @@
 		return ERR_PTR(-ENOMEM);
 	}
 
 	fd->version = je32_to_cpu(rd->version);
 	fd->ino = je32_to_cpu(rd->ino);
-	fd->nhash = full_name_hash(name, strlen(name));
+	fd->nhash = full_name_hash(name, strlen((char*)name));
 	fd->type = rd->type;
 	memcpy(fd->name, name, namelen);
 	fd->name[namelen]=0;
 
  retry:
@@ -507,11 +507,11 @@
 	rd->nsize = namelen;
 	rd->type = DT_REG;
 	rd->node_crc = cpu_to_je32(crc32(0, rd, sizeof(*rd)-8));
 	rd->name_crc = cpu_to_je32(crc32(0, name, namelen));
 
-	fd = jffs2_write_dirent(c, dir_f, rd, name, namelen, phys_ofs, ALLOC_NORMAL);
+	fd = jffs2_write_dirent(c, dir_f, rd,(unsigned char*) name, namelen, phys_ofs, ALLOC_NORMAL);
 
 	jffs2_free_raw_dirent(rd);
 	
 	if (IS_ERR(fd)) {
 		/* dirent failed to write. Delete the inode normally 
@@ -569,11 +569,11 @@
 		rd->nsize = namelen;
 		rd->type = DT_UNKNOWN;
 		rd->node_crc = cpu_to_je32(crc32(0, rd, sizeof(*rd)-8));
 		rd->name_crc = cpu_to_je32(crc32(0, name, namelen));
 
-		fd = jffs2_write_dirent(c, dir_f, rd, name, namelen, phys_ofs, ALLOC_DELETION);
+		fd = jffs2_write_dirent(c, dir_f, rd, (unsigned char*)name, namelen, phys_ofs, ALLOC_DELETION);
 		
 		jffs2_free_raw_dirent(rd);
 
 		if (IS_ERR(fd)) {
 			jffs2_complete_reservation(c);
@@ -584,11 +584,11 @@
 		/* File it. This will mark the old one obsolete. */
 		jffs2_add_fd_to_list(c, fd, &dir_f->dents);
 		up(&dir_f->sem);
 	} else {
 		struct jffs2_full_dirent **prev = &dir_f->dents;
-		uint32_t nhash = full_name_hash(name, namelen);
+		uint32_t nhash = full_name_hash((unsigned char *)name, namelen);
 
 		down(&dir_f->sem);
 
 		while ((*prev) && (*prev)->nhash <= nhash) {
 			if ((*prev)->nhash == nhash && 
@@ -680,11 +680,11 @@
 	rd->type = type;
 
 	rd->node_crc = cpu_to_je32(crc32(0, rd, sizeof(*rd)-8));
 	rd->name_crc = cpu_to_je32(crc32(0, name, namelen));
 
-	fd = jffs2_write_dirent(c, dir_f, rd, name, namelen, phys_ofs, ALLOC_NORMAL);
+	fd = jffs2_write_dirent(c, dir_f, rd,(unsigned char*) name, namelen, phys_ofs, ALLOC_NORMAL);
 	
 	jffs2_free_raw_dirent(rd);
 
 	if (IS_ERR(fd)) {
 		jffs2_complete_reservation(c);
