diff mbox series

[hurd,commited,2/2] hurd: Fix warnings

Message ID 20180128152539.12085-3-samuel.thibault@ens-lyon.org
State New
Headers show
Series hurd: Fix warnings | expand

Commit Message

Samuel Thibault Jan. 28, 2018, 3:25 p.m. UTC
* hurd/hurd/lookup.h (__hurd_file_name_lookup, hurd_file_name_lookup,
	__hurd_file_name_split, hurd_file_name_split,
	__hurd_directory_name_split, hurd_directory_name_split,
	__hurd_file_name_lookup_retry, hurd_file_name_lookup_retry,
	hurd_file_name_path_lookup): Make lookup function parameter take a
	const char *name instead of char *name.
	* hurd/hurdlookup.c (__hurd_file_name_lookup, __hurd_file_name_split,
	__hurd_directory_name_split): Likewise.
	* hurd/lookup-retry.c (__hurd_file_name_lookup_retry): Likewise.
	* hurd/path-lookup.c (hurd_file_name_path_lookup): Likewise.
---
 ChangeLog           | 10 ++++++++++
 hurd/hurd/lookup.h  | 18 +++++++++---------
 hurd/hurdlookup.c   |  6 +++---
 hurd/lookup-retry.c |  2 +-
 hurd/path-lookup.c  |  2 +-
 5 files changed, 24 insertions(+), 14 deletions(-)
diff mbox series

Patch

diff --git a/ChangeLog b/ChangeLog
index 3ca2409663..9a34b84153 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -39,6 +39,16 @@ 
 	critical section to make code simpler and avoid warning.
 	* sysdeps/mach/hurd/spawni.c (__spawni): Make relpath and abspath
 	const char * instead of char *.
+	* hurd/hurd/lookup.h (__hurd_file_name_lookup, hurd_file_name_lookup,
+	__hurd_file_name_split, hurd_file_name_split,
+	__hurd_directory_name_split, hurd_directory_name_split,
+	__hurd_file_name_lookup_retry, hurd_file_name_lookup_retry,
+	hurd_file_name_path_lookup): Make lookup function parameter take a
+	const char *name instead of char *name.
+	* hurd/hurdlookup.c (__hurd_file_name_lookup, __hurd_file_name_split,
+	__hurd_directory_name_split): Likewise.
+	* hurd/lookup-retry.c (__hurd_file_name_lookup_retry): Likewise.
+	* hurd/path-lookup.c (hurd_file_name_path_lookup): Likewise.
 
 2018-01-27  James Clarke  <jrtc27@jrtc27.com>
 
diff --git a/hurd/hurd/lookup.h b/hurd/hurd/lookup.h
index 29ca3de999..d84fef58a5 100644
--- a/hurd/hurd/lookup.h
+++ b/hurd/hurd/lookup.h
@@ -48,7 +48,7 @@  error_t __hurd_file_name_lookup (error_t (*use_init_port)
 				    error_t (*operate) (mach_port_t)),
 				 file_t (*get_dtable_port) (int fd),
 				 error_t (*lookup)
-				   (file_t dir, char *name, int flags, mode_t mode,
+				   (file_t dir, const char *name, int flags, mode_t mode,
 				    retry_type *do_retry, string_t retry_name,
 				    mach_port_t *result),
 				 const char *file_name,
@@ -59,7 +59,7 @@  error_t hurd_file_name_lookup (error_t (*use_init_port)
 				  error_t (*operate) (mach_port_t)),
 			       file_t (*get_dtable_port) (int fd),
 			       error_t (*lookup)
-				 (file_t dir, char *name, int flags, mode_t mode,
+				 (file_t dir, const char *name, int flags, mode_t mode,
 				  retry_type *do_retry, string_t retry_name,
 				  mach_port_t *result),
 			       const char *file_name,
@@ -75,7 +75,7 @@  error_t __hurd_file_name_split (error_t (*use_init_port)
 				  (int which,
 				   error_t (*operate) (mach_port_t)),
 				file_t (*get_dtable_port) (int fd),
-				error_t (*lookup) (file_t dir, char *name,
+				error_t (*lookup) (file_t dir, const char *name,
 						   int flags, mode_t mode,
 				   retry_type *do_retry, string_t retry_name,
 				   mach_port_t *result),
@@ -85,7 +85,7 @@  error_t hurd_file_name_split (error_t (*use_init_port)
 			        (int which,
 				 error_t (*operate) (mach_port_t)),
 			      file_t (*get_dtable_port) (int fd),
-			      error_t (*lookup) (file_t dir, char *name,
+			      error_t (*lookup) (file_t dir, const char *name,
 						 int flags, mode_t mode,
 				 retry_type *do_retry, string_t retry_name,
 				 mach_port_t *result),
@@ -99,7 +99,7 @@  error_t __hurd_directory_name_split (error_t (*use_init_port)
 				  (int which,
 				   error_t (*operate) (mach_port_t)),
 				file_t (*get_dtable_port) (int fd),
-				error_t (*lookup) (file_t dir, char *name,
+				error_t (*lookup) (file_t dir, const char *name,
 						   int flags, mode_t mode,
 				   retry_type *do_retry, string_t retry_name,
 				   mach_port_t *result),
@@ -109,7 +109,7 @@  error_t hurd_directory_name_split (error_t (*use_init_port)
 				   (int which,
 				    error_t (*operate) (mach_port_t)),
 				   file_t (*get_dtable_port) (int fd),
-				   error_t (*lookup) (file_t dir, char *name,
+				   error_t (*lookup) (file_t dir, const char *name,
 						      int flags, mode_t mode,
 				    retry_type *do_retry, string_t retry_name,
 				    mach_port_t *result),
@@ -128,7 +128,7 @@  error_t __hurd_file_name_lookup_retry (error_t (*use_init_port)
 					  error_t (*operate) (mach_port_t)),
 				       file_t (*get_dtable_port) (int fd),
 				       error_t (*lookup)
-				         (file_t dir, char *name,
+				         (file_t dir, const char *name,
 					  int flags, mode_t mode,
 					  retry_type *do_retry,
 					  string_t retry_name,
@@ -142,7 +142,7 @@  error_t hurd_file_name_lookup_retry (error_t (*use_init_port)
 					error_t (*operate) (mach_port_t)),
 				     file_t (*get_dtable_port) (int fd),
 				     error_t (*lookup)
-				       (file_t dir, char *name,
+				       (file_t dir, const char *name,
 					int flags, mode_t mode,
 					retry_type *do_retry,
 					string_t retry_name,
@@ -178,7 +178,7 @@  error_t hurd_file_name_path_lookup (error_t (*use_init_port)
 				     error_t (*operate) (mach_port_t)),
 				    file_t (*get_dtable_port) (int fd),
 				    error_t (*lookup)
-				      (file_t dir, char *name,
+				      (file_t dir, const char *name,
 				       int flags, mode_t mode,
 				       retry_type *do_retry,
 				       string_t retry_name,
diff --git a/hurd/hurdlookup.c b/hurd/hurdlookup.c
index f58d72b032..1861d5879d 100644
--- a/hurd/hurdlookup.c
+++ b/hurd/hurdlookup.c
@@ -42,7 +42,7 @@  __hurd_file_name_lookup (error_t (*use_init_port)
 			   (int which, error_t (*operate) (file_t)),
 			 file_t (*get_dtable_port) (int fd),
 			 error_t (*lookup)
-			   (file_t dir, char *name, int flags, mode_t mode,
+			   (file_t dir, const char *name, int flags, mode_t mode,
 			    retry_type *do_retry, string_t retry_name,
 			    mach_port_t *result),
 			 const char *file_name, int flags, mode_t mode,
@@ -105,7 +105,7 @@  __hurd_file_name_split (error_t (*use_init_port)
 			  (int which, error_t (*operate) (file_t)),
 			file_t (*get_dtable_port) (int fd),
 			error_t (*lookup)
-			  (file_t dir, char *name, int flags, mode_t mode,
+			  (file_t dir, const char *name, int flags, mode_t mode,
 			   retry_type *do_retry, string_t retry_name,
 			   mach_port_t *result),
 			const char *file_name,
@@ -158,7 +158,7 @@  __hurd_directory_name_split (error_t (*use_init_port)
 			     (int which, error_t (*operate) (file_t)),
 			     file_t (*get_dtable_port) (int fd),
 			     error_t (*lookup)
-			     (file_t dir, char *name, int flags, mode_t mode,
+			     (file_t dir, const char *name, int flags, mode_t mode,
 			      retry_type *do_retry, string_t retry_name,
 			      mach_port_t *result),
 			     const char *file_name,
diff --git a/hurd/lookup-retry.c b/hurd/lookup-retry.c
index b1fb9b6744..319e9c0a4c 100644
--- a/hurd/lookup-retry.c
+++ b/hurd/lookup-retry.c
@@ -47,7 +47,7 @@  __hurd_file_name_lookup_retry (error_t (*use_init_port)
 				 (int which, error_t (*operate) (file_t)),
 			       file_t (*get_dtable_port) (int fd),
 			       error_t (*lookup)
-				 (file_t dir, char *name,
+				 (file_t dir, const char *name,
 				  int flags, mode_t mode,
 				  retry_type *do_retry, string_t retry_name,
 				  mach_port_t *result),
diff --git a/hurd/path-lookup.c b/hurd/path-lookup.c
index 3861d21cf7..d3906e1c9b 100644
--- a/hurd/path-lookup.c
+++ b/hurd/path-lookup.c
@@ -91,7 +91,7 @@  hurd_file_name_path_lookup (error_t (*use_init_port)
 			      (int which, error_t (*operate) (mach_port_t)),
 			    file_t (*get_dtable_port) (int fd),
 			    error_t (*lookup)
-			      (file_t dir, char *name, int flags, mode_t mode,
+			      (file_t dir, const char *name, int flags, mode_t mode,
 			       retry_type *do_retry, string_t retry_name,
 			       mach_port_t *result),
 			    const char *file_name, const char *path,