hurd: Fix warnings

* 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.
This commit is contained in:
Samuel Thibault 2018-01-28 16:23:59 +01:00
parent 844bf92148
commit f8bee46cc2
5 changed files with 24 additions and 14 deletions

View File

@ -39,6 +39,16 @@
critical section to make code simpler and avoid warning. critical section to make code simpler and avoid warning.
* sysdeps/mach/hurd/spawni.c (__spawni): Make relpath and abspath * sysdeps/mach/hurd/spawni.c (__spawni): Make relpath and abspath
const char * instead of char *. 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> 2018-01-27 James Clarke <jrtc27@jrtc27.com>

View File

@ -48,7 +48,7 @@ error_t __hurd_file_name_lookup (error_t (*use_init_port)
error_t (*operate) (mach_port_t)), error_t (*operate) (mach_port_t)),
file_t (*get_dtable_port) (int fd), file_t (*get_dtable_port) (int fd),
error_t (*lookup) 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, retry_type *do_retry, string_t retry_name,
mach_port_t *result), mach_port_t *result),
const char *file_name, 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)), error_t (*operate) (mach_port_t)),
file_t (*get_dtable_port) (int fd), file_t (*get_dtable_port) (int fd),
error_t (*lookup) 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, retry_type *do_retry, string_t retry_name,
mach_port_t *result), mach_port_t *result),
const char *file_name, const char *file_name,
@ -75,7 +75,7 @@ error_t __hurd_file_name_split (error_t (*use_init_port)
(int which, (int which,
error_t (*operate) (mach_port_t)), error_t (*operate) (mach_port_t)),
file_t (*get_dtable_port) (int fd), 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, int flags, mode_t mode,
retry_type *do_retry, string_t retry_name, retry_type *do_retry, string_t retry_name,
mach_port_t *result), mach_port_t *result),
@ -85,7 +85,7 @@ error_t hurd_file_name_split (error_t (*use_init_port)
(int which, (int which,
error_t (*operate) (mach_port_t)), error_t (*operate) (mach_port_t)),
file_t (*get_dtable_port) (int fd), 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, int flags, mode_t mode,
retry_type *do_retry, string_t retry_name, retry_type *do_retry, string_t retry_name,
mach_port_t *result), mach_port_t *result),
@ -99,7 +99,7 @@ error_t __hurd_directory_name_split (error_t (*use_init_port)
(int which, (int which,
error_t (*operate) (mach_port_t)), error_t (*operate) (mach_port_t)),
file_t (*get_dtable_port) (int fd), 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, int flags, mode_t mode,
retry_type *do_retry, string_t retry_name, retry_type *do_retry, string_t retry_name,
mach_port_t *result), mach_port_t *result),
@ -109,7 +109,7 @@ error_t hurd_directory_name_split (error_t (*use_init_port)
(int which, (int which,
error_t (*operate) (mach_port_t)), error_t (*operate) (mach_port_t)),
file_t (*get_dtable_port) (int fd), 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, int flags, mode_t mode,
retry_type *do_retry, string_t retry_name, retry_type *do_retry, string_t retry_name,
mach_port_t *result), 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)), error_t (*operate) (mach_port_t)),
file_t (*get_dtable_port) (int fd), file_t (*get_dtable_port) (int fd),
error_t (*lookup) error_t (*lookup)
(file_t dir, char *name, (file_t dir, const char *name,
int flags, mode_t mode, int flags, mode_t mode,
retry_type *do_retry, retry_type *do_retry,
string_t retry_name, 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)), error_t (*operate) (mach_port_t)),
file_t (*get_dtable_port) (int fd), file_t (*get_dtable_port) (int fd),
error_t (*lookup) error_t (*lookup)
(file_t dir, char *name, (file_t dir, const char *name,
int flags, mode_t mode, int flags, mode_t mode,
retry_type *do_retry, retry_type *do_retry,
string_t retry_name, 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)), error_t (*operate) (mach_port_t)),
file_t (*get_dtable_port) (int fd), file_t (*get_dtable_port) (int fd),
error_t (*lookup) error_t (*lookup)
(file_t dir, char *name, (file_t dir, const char *name,
int flags, mode_t mode, int flags, mode_t mode,
retry_type *do_retry, retry_type *do_retry,
string_t retry_name, string_t retry_name,

View File

@ -42,7 +42,7 @@ __hurd_file_name_lookup (error_t (*use_init_port)
(int which, error_t (*operate) (file_t)), (int which, error_t (*operate) (file_t)),
file_t (*get_dtable_port) (int fd), file_t (*get_dtable_port) (int fd),
error_t (*lookup) 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, retry_type *do_retry, string_t retry_name,
mach_port_t *result), mach_port_t *result),
const char *file_name, int flags, mode_t mode, 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)), (int which, error_t (*operate) (file_t)),
file_t (*get_dtable_port) (int fd), file_t (*get_dtable_port) (int fd),
error_t (*lookup) 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, retry_type *do_retry, string_t retry_name,
mach_port_t *result), mach_port_t *result),
const char *file_name, const char *file_name,
@ -158,7 +158,7 @@ __hurd_directory_name_split (error_t (*use_init_port)
(int which, error_t (*operate) (file_t)), (int which, error_t (*operate) (file_t)),
file_t (*get_dtable_port) (int fd), file_t (*get_dtable_port) (int fd),
error_t (*lookup) 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, retry_type *do_retry, string_t retry_name,
mach_port_t *result), mach_port_t *result),
const char *file_name, const char *file_name,

View File

@ -47,7 +47,7 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port)
(int which, error_t (*operate) (file_t)), (int which, error_t (*operate) (file_t)),
file_t (*get_dtable_port) (int fd), file_t (*get_dtable_port) (int fd),
error_t (*lookup) error_t (*lookup)
(file_t dir, char *name, (file_t dir, const char *name,
int flags, mode_t mode, int flags, mode_t mode,
retry_type *do_retry, string_t retry_name, retry_type *do_retry, string_t retry_name,
mach_port_t *result), mach_port_t *result),

View File

@ -91,7 +91,7 @@ hurd_file_name_path_lookup (error_t (*use_init_port)
(int which, error_t (*operate) (mach_port_t)), (int which, error_t (*operate) (mach_port_t)),
file_t (*get_dtable_port) (int fd), file_t (*get_dtable_port) (int fd),
error_t (*lookup) 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, retry_type *do_retry, string_t retry_name,
mach_port_t *result), mach_port_t *result),
const char *file_name, const char *path, const char *file_name, const char *path,