diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-07-31 21:40:25 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:38:27 -0500 |
commit | 430fa0eba08cbf180d83740a895a0018af1c7f21 (patch) | |
tree | 0f51b6635f456a800a7fe609f30fdbd537460ee8 /source3/smbd | |
parent | e7952e9c14218d0c8c13973056ab8762876e5a79 (diff) | |
download | samba-430fa0eba08cbf180d83740a895a0018af1c7f21.tar.gz samba-430fa0eba08cbf180d83740a895a0018af1c7f21.tar.bz2 samba-430fa0eba08cbf180d83740a895a0018af1c7f21.zip |
r17348: Some C++ warnings
(This used to be commit ae6b9b34e59167e3958bfdb9997fa25340b9a0a3)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/msdfs.c | 4 | ||||
-rw-r--r-- | source3/smbd/ntquotas.c | 2 | ||||
-rw-r--r-- | source3/smbd/posix_acls.c | 6 | ||||
-rw-r--r-- | source3/smbd/sec_ctx.c | 3 | ||||
-rw-r--r-- | source3/smbd/vfs.c | 6 |
5 files changed, 11 insertions, 10 deletions
diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c index b698bc781d..6891022264 100644 --- a/source3/smbd/msdfs.c +++ b/source3/smbd/msdfs.c @@ -655,7 +655,7 @@ static int setup_ver2_dfs_referral(char *pathname, char **ppdata, /* add the unexplained 0x16 bytes */ reply_size += 0x16; - pdata = SMB_REALLOC(pdata,reply_size); + pdata = (char *)SMB_REALLOC(pdata,reply_size); if(pdata == NULL) { DEBUG(0,("malloc failed for Realloc!\n")); return -1; @@ -740,7 +740,7 @@ static int setup_ver3_dfs_referral(char *pathname, char **ppdata, reply_size += (strlen(junction->referral_list[i].alternate_path)+1)*2; } - pdata = SMB_REALLOC(pdata,reply_size); + pdata = (char *)SMB_REALLOC(pdata,reply_size); if(pdata == NULL) { DEBUG(0,("version3 referral setup: malloc failed for Realloc!\n")); return -1; diff --git a/source3/smbd/ntquotas.c b/source3/smbd/ntquotas.c index a824978ece..e754583312 100644 --- a/source3/smbd/ntquotas.c +++ b/source3/smbd/ntquotas.c @@ -244,7 +244,7 @@ void destroy_quota_handle(void **pqt_handle) if (!pqt_handle||!(*pqt_handle)) return; - qt_handle = (*pqt_handle); + qt_handle = (SMB_NTQUOTA_HANDLE *)(*pqt_handle); if (qt_handle->quota_list) diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index 3ea442f818..a431f6e07a 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -169,7 +169,7 @@ static char *create_pai_buf(canon_ace *file_ace_list, canon_ace *dir_ace_list, B *store_size = PAI_ENTRIES_BASE + ((num_entries + num_def_entries)*PAI_ENTRY_LENGTH); - pai_buf = SMB_MALLOC(*store_size); + pai_buf = (char *)SMB_MALLOC(*store_size); if (!pai_buf) { return NULL; } @@ -441,7 +441,7 @@ static struct pai_val *load_inherited_info(files_struct *fsp) if (!lp_map_acl_inherit(SNUM(fsp->conn))) return NULL; - if ((pai_buf = SMB_MALLOC(pai_buf_size)) == NULL) + if ((pai_buf = (char *)SMB_MALLOC(pai_buf_size)) == NULL) return NULL; do { @@ -462,7 +462,7 @@ static struct pai_val *load_inherited_info(files_struct *fsp) if (pai_buf_size > 1024*1024) { return NULL; /* Limit malloc to 1mb. */ } - if ((pai_buf = SMB_MALLOC(pai_buf_size)) == NULL) + if ((pai_buf = (char *)SMB_MALLOC(pai_buf_size)) == NULL) return NULL; } } while (ret == -1); diff --git a/source3/smbd/sec_ctx.c b/source3/smbd/sec_ctx.c index 51d1d6cc0a..be00db9adb 100644 --- a/source3/smbd/sec_ctx.c +++ b/source3/smbd/sec_ctx.c @@ -259,7 +259,8 @@ void set_sec_ctx(uid_t uid, gid_t gid, int ngroups, gid_t *groups, NT_USER_TOKEN TALLOC_FREE(ctx_p->token); if (ngroups) { - ctx_p->ut.groups = memdup(groups, sizeof(gid_t) * ngroups); + ctx_p->ut.groups = (gid_t *)memdup(groups, + sizeof(gid_t) * ngroups); if (!ctx_p->ut.groups) { smb_panic("memdup failed"); } diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index 7bb5f798f9..ed6b3dd4c4 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -206,8 +206,8 @@ void *vfs_add_fsp_extension_notype(vfs_handle_struct *handle, files_struct *fsp, return ext_data; } - ext = TALLOC_ZERO(handle->conn->mem_ctx, - sizeof(struct vfs_fsp_data) + ext_size); + ext = (struct vfs_fsp_data *)TALLOC_ZERO( + handle->conn->mem_ctx, sizeof(struct vfs_fsp_data) + ext_size); if (ext == NULL) { return NULL; } @@ -647,7 +647,7 @@ char *vfs_readdirname(connection_struct *conn, void *p) if (!p) return(NULL); - ptr = SMB_VFS_READDIR(conn,p); + ptr = SMB_VFS_READDIR(conn, (DIR *)p); if (!ptr) return(NULL); |