From bd3b0cfd7c0c51048ff898e5e1b121f8a3dd1126 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Wed, 2 Jan 2013 19:18:32 +0100 Subject: [PATCH] Fix several warnings, remove const --- etc/afpd/file.c | 2 +- etc/afpd/unix.c | 2 +- etc/afpd/unix.h | 2 +- etc/uams/uams_dhx2_pam.c | 2 +- etc/uams/uams_dhx_pam.c | 2 +- etc/uams/uams_pam.c | 2 +- libatalk/vfs/unix.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/etc/afpd/file.c b/etc/afpd/file.c index 7f0e234a..c2a1413d 100644 --- a/etc/afpd/file.c +++ b/etc/afpd/file.c @@ -1939,7 +1939,7 @@ delete: } /* ------------------------------ */ -static struct adouble *find_adouble(const AFPObj *obj, const struct vol *vol, struct path *path, struct ofork **of, struct adouble *adp) +static struct adouble *find_adouble(const AFPObj *obj, struct vol *vol, struct path *path, struct ofork **of, struct adouble *adp) { int ret; diff --git a/etc/afpd/unix.c b/etc/afpd/unix.c index 31086bb6..7c904628 100644 --- a/etc/afpd/unix.c +++ b/etc/afpd/unix.c @@ -224,7 +224,7 @@ int setfilunixmode (const struct vol *vol, struct path* path, mode_t mode) /* --------------------- */ -int setdirunixmode(const struct vol *vol, const char *name, mode_t mode) +int setdirunixmode(const struct vol *vol, char *name, mode_t mode) { LOG(log_debug, logtype_afpd, "setdirunixmode('%s', mode:%04o) {v_dperm:%04o}", fullpathname(name), mode, vol->v_dperm); diff --git a/etc/afpd/unix.h b/etc/afpd/unix.h index 73a515b2..3b3c281b 100644 --- a/etc/afpd/unix.h +++ b/etc/afpd/unix.h @@ -213,7 +213,7 @@ extern int uquota_getvolspace (const AFPObj *obj, struct vol *, VolSpace *, VolS extern struct afp_options default_options; -extern int setdirunixmode (const struct vol *, const char *, mode_t); +extern int setdirunixmode (const struct vol *, char *, mode_t); extern int setdirmode (const struct vol *, const char *, mode_t); extern int setdirowner (const struct vol *, const char *, const uid_t, const gid_t); extern int setfilunixmode (const struct vol *, struct path*, const mode_t); diff --git a/etc/uams/uams_dhx2_pam.c b/etc/uams/uams_dhx2_pam.c index 0de4b5ce..cb1c507d 100644 --- a/etc/uams/uams_dhx2_pam.c +++ b/etc/uams/uams_dhx2_pam.c @@ -136,7 +136,7 @@ error: * echo off means password. */ static int PAM_conv (int num_msg, - const struct pam_message **msg, + struct pam_message **msg, struct pam_response **resp, void *appdata_ptr _U_) { int count = 0; diff --git a/etc/uams/uams_dhx_pam.c b/etc/uams/uams_dhx_pam.c index 4c7d87c0..dbe24a20 100644 --- a/etc/uams/uams_dhx_pam.c +++ b/etc/uams/uams_dhx_pam.c @@ -80,7 +80,7 @@ static char *PAM_password; * echo off means password. */ static int PAM_conv (int num_msg, - const struct pam_message **msg, + struct pam_message **msg, struct pam_response **resp, void *appdata_ptr _U_) { int count = 0; diff --git a/etc/uams/uams_pam.c b/etc/uams/uams_pam.c index 6f15ac0a..c3762c94 100644 --- a/etc/uams/uams_pam.c +++ b/etc/uams/uams_pam.c @@ -54,7 +54,7 @@ extern UAM_MODULE_EXPORT void append(struct papfile *, const char *, int); * echo off means password. */ static int PAM_conv (int num_msg, - const struct pam_message **msg, + struct pam_message **msg, struct pam_response **resp, void *appdata_ptr _U_) { diff --git a/libatalk/vfs/unix.c b/libatalk/vfs/unix.c index 40f14fb5..f414bf59 100644 --- a/libatalk/vfs/unix.c +++ b/libatalk/vfs/unix.c @@ -46,7 +46,7 @@ int setfilmode(const struct vol *vol, const char *name, mode_t mode, struct stat mode |= st->st_mode & ~mask; /* keep other bits from previous mode */ - if (ochmod(name, mode & ~vol->v_umask, st, vol_syml_opt(vol) | O_NETATALK_ACL) < 0 && errno != EPERM ) { + if (ochmod((char *)name, mode & ~vol->v_umask, st, vol_syml_opt(vol) | O_NETATALK_ACL) < 0 && errno != EPERM ) { return -1; } return 0; -- 2.39.2