From 6abef0810007c317c3ee866eb3933ce2c696085f Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 12 May 2003 21:27:54 +0000 Subject: [PATCH] Fix obvious compiler warnings. Jeremy. (This used to be commit 2a6d0c2481c3c34351e57c30a85004babdbf99b0) --- source3/passdb/pdb_guest.c | 1 - source3/passdb/pdb_ldap.c | 1 - source3/passdb/pdb_tdb.c | 1 - source3/rpc_server/srv_samr_nt.c | 1 - source3/sam/idmap_util.c | 2 -- source3/smbd/vfs-wrap.c | 1 - source3/utils/net_ads.c | 2 +- source3/utils/pdbedit.c | 1 - 8 files changed, 1 insertion(+), 9 deletions(-) diff --git a/source3/passdb/pdb_guest.c b/source3/passdb/pdb_guest.c index 9bcdccc7e7b..f5cd3d996d2 100644 --- a/source3/passdb/pdb_guest.c +++ b/source3/passdb/pdb_guest.c @@ -26,7 +26,6 @@ static NTSTATUS guestsam_getsampwnam (struct pdb_methods *methods, SAM_ACCOUNT *sam_account, const char *sname) { - NTSTATUS nt_status; const char *guest_account = lp_guestaccount(); if (!sam_account || !sname) { diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index da3a163c1e6..b75238e971b 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -1599,7 +1599,6 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state, acct_desc, munged_dial, workstations; - struct passwd *pw; uint32 user_rid; uint8 smblmpwd[LM_HASH_LEN], smbntpwd[NT_HASH_LEN]; diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c index 74437cba6f3..93fa4e1886b 100644 --- a/source3/passdb/pdb_tdb.c +++ b/source3/passdb/pdb_tdb.c @@ -99,7 +99,6 @@ static BOOL init_sam_from_buffer (struct tdbsam_privates *tdb_state, uint32 len = 0; uint32 lm_pw_len, nt_pw_len, hourslen; BOOL ret = True; - struct passwd *pw; uid_t uid = -1; gid_t gid = -1; diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index 8c9e22966a5..fa7a10bb1a0 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -3509,7 +3509,6 @@ NTSTATUS _samr_add_groupmem(pipes_struct *p, SAMR_Q_ADD_GROUPMEM *q_u, SAMR_R_AD struct group *grp; fstring grp_name; GROUP_MAP map; - uid_t uid; NTSTATUS ret; SAM_ACCOUNT *sam_user=NULL; BOOL check; diff --git a/source3/sam/idmap_util.c b/source3/sam/idmap_util.c index e0c492542b3..8c3a3788327 100644 --- a/source3/sam/idmap_util.c +++ b/source3/sam/idmap_util.c @@ -175,7 +175,6 @@ NTSTATUS uid_to_sid(DOM_SID *sid, uid_t uid) NTSTATUS gid_to_sid(DOM_SID *sid, gid_t gid) { NTSTATUS ret = NT_STATUS_UNSUCCESSFUL; - GROUP_MAP map; unid_t id; int flags; @@ -272,7 +271,6 @@ NTSTATUS sid_to_gid(const DOM_SID *sid, gid_t *gid) { NTSTATUS ret = NT_STATUS_UNSUCCESSFUL; BOOL fallback = False; - uint32 rid; unid_t id; int flags; diff --git a/source3/smbd/vfs-wrap.c b/source3/smbd/vfs-wrap.c index e170effd4e8..9f0995d398b 100644 --- a/source3/smbd/vfs-wrap.c +++ b/source3/smbd/vfs-wrap.c @@ -297,7 +297,6 @@ int vfswrap_chmod(vfs_handle_struct *handle, connection_struct *conn, const char int vfswrap_fchmod(vfs_handle_struct *handle, files_struct *fsp, int fd, mode_t mode) { int result; - struct vfs_ops *vfs_ops = &fsp->conn->vfs; START_PROFILE(syscall_fchmod); diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index 1a50f9d2707..626db96994e 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -159,7 +159,7 @@ retry: * extract the realm and convert to upper case. * This is only used to establish the connection. */ - if (cp = strchr(ads->auth.user_name, '@')) { + if ((cp = strchr(ads->auth.user_name, '@'))!=0) { *cp++ = '\0'; ads->auth.realm = smb_xstrdup(cp); strupper(ads->auth.realm); diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c index 13f35e88806..9a45049bc5e 100644 --- a/source3/utils/pdbedit.c +++ b/source3/utils/pdbedit.c @@ -112,7 +112,6 @@ static int export_groups (struct pdb_context *in, struct pdb_context *out) { static int print_sam_info (SAM_ACCOUNT *sam_pwent, BOOL verbosity, BOOL smbpwdstyle) { uid_t uid; - gid_t gid; time_t tmp; /* TODO: chaeck if entry is a user or a workstation */