Patchwork [4/6] mtd-utils/mkfs.jffs2: fixed warnings

login
register
mail settings
Submitter Brian Norris
Date July 8, 2010, 8:50 p.m.
Message ID <1278622209-20149-5-git-send-email-norris@broadcom.com>
Download mbox | patch
Permalink /patch/58295/
State Accepted
Commit 910d1d29223dfd230e19ea0ae4c499df27bb94d0
Headers show

Comments

Brian Norris - July 8, 2010, 8:50 p.m.
Changed "char*" to "const char*" in certain function argument lists
to prevent compiler warnings for passing a hard-coded string.

Signed-off-by: Brian Norris <norris@broadcom.com>
---
 mkfs.jffs2.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
Artem Bityutskiy - July 18, 2010, 7:19 a.m.
On Thu, 2010-07-08 at 13:50 -0700, Brian Norris wrote:
> Changed "char*" to "const char*" in certain function argument lists
> to prevent compiler warnings for passing a hard-coded string.
> 
> Signed-off-by: Brian Norris <norris@broadcom.com>

Pushed, thanks.

Patch

diff --git a/mkfs.jffs2.c b/mkfs.jffs2.c
index 64cafb6..bfa1c6e 100644
--- a/mkfs.jffs2.c
+++ b/mkfs.jffs2.c
@@ -309,8 +309,8 @@  static struct filesystem_entry *find_filesystem_entry(
 	return (NULL);
 }
 
-static struct filesystem_entry *add_host_filesystem_entry(
-		char *name, char *path, unsigned long uid, unsigned long gid,
+static struct filesystem_entry *add_host_filesystem_entry(const char *name,
+		const char *path, unsigned long uid, unsigned long gid,
 		unsigned long mode, dev_t rdev, struct filesystem_entry *parent)
 {
 	int status;
@@ -401,7 +401,8 @@  static struct filesystem_entry *add_host_filesystem_entry(
 }
 
 static struct filesystem_entry *recursive_add_host_directory(
-		struct filesystem_entry *parent, char *targetpath, char *hostpath)
+		struct filesystem_entry *parent, const char *targetpath,
+		const char *hostpath)
 {
 	int i, n;
 	struct stat sb;