1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

r9780: Clean up a bunch of compiler warnings.

(This used to be commit 623d2e6931)
This commit is contained in:
James Peach 2005-08-30 06:41:32 +00:00 committed by Gerald (Jerry) Carter
parent 39c05dca3c
commit 8c072021ef
9 changed files with 9 additions and 28 deletions

View File

@ -213,8 +213,9 @@ void init_valid_table(void)
size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate) size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate)
{ {
return push_ucs2(NULL, dst, src, len, int flags = null_terminate ? STR_UNICODE|STR_NOALIGN|STR_TERMINATE
STR_UNICODE|STR_NOALIGN | (null_terminate?STR_TERMINATE:0)); : STR_UNICODE|STR_NOALIGN;
return push_ucs2(NULL, dst, src, len, flags);
} }

View File

@ -317,23 +317,17 @@ static krb5_error_code parse_setpw_reply(krb5_context context,
switch(res_code) { switch(res_code) {
case KRB5_KPASSWD_ACCESSDENIED: case KRB5_KPASSWD_ACCESSDENIED:
return KRB5KDC_ERR_BADOPTION; return KRB5KDC_ERR_BADOPTION;
break;
case KRB5_KPASSWD_INITIAL_FLAG_NEEDED: case KRB5_KPASSWD_INITIAL_FLAG_NEEDED:
return KRB5KDC_ERR_BADOPTION; return KRB5KDC_ERR_BADOPTION;
/* return KV5M_ALT_METHOD; MIT-only define */ /* return KV5M_ALT_METHOD; MIT-only define */
break;
case KRB5_KPASSWD_ETYPE_NOSUPP: case KRB5_KPASSWD_ETYPE_NOSUPP:
return KRB5KDC_ERR_ETYPE_NOSUPP; return KRB5KDC_ERR_ETYPE_NOSUPP;
break;
case KRB5_KPASSWD_BAD_PRINCIPAL: case KRB5_KPASSWD_BAD_PRINCIPAL:
return KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN; return KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN;
break;
case KRB5_KPASSWD_POLICY_REJECT: case KRB5_KPASSWD_POLICY_REJECT:
return KRB5KDC_ERR_POLICY; return KRB5KDC_ERR_POLICY;
break;
default: default:
return KRB5KRB_ERR_GENERIC; return KRB5KRB_ERR_GENERIC;
break;
} }
} }
} }

View File

@ -280,14 +280,6 @@ static int winbind_named_pipe_sock(const char *dir)
close(fd); close(fd);
return -1; return -1;
if (connect(fd, (struct sockaddr *)&sunaddr,
sizeof(sunaddr)) == -1) {
close(fd);
return -1;
}
return fd;
} }
/* Connect to winbindd socket */ /* Connect to winbindd socket */

View File

@ -98,7 +98,7 @@ static struct winbindd_domain *add_trusted_domain(const char *domain_name, const
{ {
struct winbindd_domain *domain; struct winbindd_domain *domain;
const char *alternative_name = NULL; const char *alternative_name = NULL;
static const DOM_SID null_sid; static const DOM_SID null_sid = {0};
/* ignore alt_name if we are not in an AD domain */ /* ignore alt_name if we are not in an AD domain */

View File

@ -2004,9 +2004,9 @@ FN_LOCAL_INTEGER(lp_oplock_contention_limit, iOplockContentionLimit)
FN_LOCAL_INTEGER(lp_csc_policy, iCSCPolicy) FN_LOCAL_INTEGER(lp_csc_policy, iCSCPolicy)
FN_LOCAL_INTEGER(lp_write_cache_size, iWriteCacheSize) FN_LOCAL_INTEGER(lp_write_cache_size, iWriteCacheSize)
FN_LOCAL_INTEGER(lp_block_size, iBlock_size) FN_LOCAL_INTEGER(lp_block_size, iBlock_size)
FN_LOCAL_INTEGER(lp_allocation_roundup_size, iallocation_roundup_size); FN_LOCAL_INTEGER(lp_allocation_roundup_size, iallocation_roundup_size)
FN_LOCAL_INTEGER(lp_aio_read_size, iAioReadSize); FN_LOCAL_INTEGER(lp_aio_read_size, iAioReadSize)
FN_LOCAL_INTEGER(lp_aio_write_size, iAioWriteSize); FN_LOCAL_INTEGER(lp_aio_write_size, iAioWriteSize)
FN_LOCAL_CHAR(lp_magicchar, magic_char) FN_LOCAL_CHAR(lp_magicchar, magic_char)
FN_GLOBAL_INTEGER(lp_winbind_cache_time, &Globals.winbind_cache_time) FN_GLOBAL_INTEGER(lp_winbind_cache_time, &Globals.winbind_cache_time)
FN_GLOBAL_INTEGER(lp_winbind_max_idle_children, &Globals.winbind_max_idle_children) FN_GLOBAL_INTEGER(lp_winbind_max_idle_children, &Globals.winbind_max_idle_children)

View File

@ -3036,7 +3036,6 @@ static BOOL lsa_io_trustdom_query(const char *desc, prs_struct *ps, int depth, L
default: default:
DEBUG(0,("unsupported info-level: %d\n", info->info_class)); DEBUG(0,("unsupported info-level: %d\n", info->info_class));
return False; return False;
break;
} }
return True; return True;

View File

@ -1078,8 +1078,6 @@ WERROR _reg_save_key(pipes_struct *p, REG_Q_SAVE_KEY *q_u, REG_R_SAVE_KEY *r_u)
DEBUG(2,("_reg_save_key: Saving [%s] to %s in share %s\n", regkey->name, filename, lp_servicename(snum) )); DEBUG(2,("_reg_save_key: Saving [%s] to %s in share %s\n", regkey->name, filename, lp_servicename(snum) ));
return backup_registry_key( regkey, filename ); return backup_registry_key( regkey, filename );
return WERR_OK;
} }
/******************************************************************* /*******************************************************************

View File

@ -1597,11 +1597,9 @@ WERROR _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, S
DEBUG(3, ("_srv_net_share_set_info: client is trying to change csc policy from the network; must be done with smb.conf\n")); DEBUG(3, ("_srv_net_share_set_info: client is trying to change csc policy from the network; must be done with smb.conf\n"));
return WERR_ACCESS_DENIED; return WERR_ACCESS_DENIED;
} }
break;
case 1006: case 1006:
case 1007: case 1007:
return WERR_ACCESS_DENIED; return WERR_ACCESS_DENIED;
break;
case 1501: case 1501:
pstrcpy(pathname, lp_pathname(snum)); pstrcpy(pathname, lp_pathname(snum));
fstrcpy(comment, lp_comment(snum)); fstrcpy(comment, lp_comment(snum));
@ -1753,7 +1751,6 @@ WERROR _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET_S
case 1006: case 1006:
case 1007: case 1007:
return WERR_ACCESS_DENIED; return WERR_ACCESS_DENIED;
break;
case 1501: case 1501:
/* DFS only level. */ /* DFS only level. */
return WERR_ACCESS_DENIED; return WERR_ACCESS_DENIED;

View File

@ -188,7 +188,7 @@ int main( int argc, char *argv[] )
exit(1); exit(1);
} }
if ((!change & new_val) || (change & !new_val)) { if ((!change && new_val) || (change && !new_val)) {
fprintf(stderr, "You must specify both -c and -n if one or the other is set!\n"); fprintf(stderr, "You must specify both -c and -n if one or the other is set!\n");
poptPrintUsage(pc, stderr, 0); poptPrintUsage(pc, stderr, 0);
exit(252); exit(252);
@ -225,5 +225,5 @@ int main( int argc, char *argv[] )
poptFreeContext(pc); poptFreeContext(pc);
exit( 0 ); return( 0 );
} }