summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2007-12-20 22:17:16 +0100
committerVolker Lendecke <vl@samba.org>2007-12-21 09:58:20 +0100
commitaddf598cde41d17ad4cf497a64b9a2b27e4028c5 (patch)
tree11b020444f0728e1745e2e2af29b81b55d8fc467 /source3
parenteeb92cedde4bc45603be4fdcf2f53dd2cc29f1d0 (diff)
downloadsamba-addf598cde41d17ad4cf497a64b9a2b27e4028c5.tar.gz
samba-addf598cde41d17ad4cf497a64b9a2b27e4028c5.tar.bz2
samba-addf598cde41d17ad4cf497a64b9a2b27e4028c5.zip
Some C++ warnings
(This used to be commit 5ab82d4f574f2a2e2761e9e414c66a70aeffb05d)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/memcache.c2
-rw-r--r--source3/lib/socket_wrapper/socket_wrapper.c4
-rw-r--r--source3/lib/time.c4
-rw-r--r--source3/libsmb/clientgen.c4
-rw-r--r--source3/rpc_server/srv_dfs_nt.c2
-rw-r--r--source3/rpc_server/srv_srvsvc_nt.c2
-rw-r--r--source3/rpc_server/srv_winreg_nt.c2
-rw-r--r--source3/rpc_server/srv_wkssvc_nt.c2
-rw-r--r--source3/smbd/reply.c4
9 files changed, 13 insertions, 13 deletions
diff --git a/source3/lib/memcache.c b/source3/lib/memcache.c
index 192a822cde..448b8b2f84 100644
--- a/source3/lib/memcache.c
+++ b/source3/lib/memcache.c
@@ -61,7 +61,7 @@ static int memcache_destructor(struct memcache *cache) {
for (e = cache->mru; e != NULL; e = next) {
next = e->next;
- if (memcache_is_talloc(e->n)
+ if (memcache_is_talloc((enum memcache_number)e->n)
&& (e->valuelength == sizeof(void *))) {
DATA_BLOB key, value;
void *ptr;
diff --git a/source3/lib/socket_wrapper/socket_wrapper.c b/source3/lib/socket_wrapper/socket_wrapper.c
index 3a72c5a74a..a84c460114 100644
--- a/source3/lib/socket_wrapper/socket_wrapper.c
+++ b/source3/lib/socket_wrapper/socket_wrapper.c
@@ -571,8 +571,8 @@ static const char *socket_wrapper_pcap_file(void)
{
static int initialized = 0;
static const char *s = NULL;
- static const struct swrap_file_hdr h;
- static const struct swrap_packet p;
+ static const struct swrap_file_hdr h = { 0, };
+ static const struct swrap_packet p = { 0, };
if (initialized == 1) {
return s;
diff --git a/source3/lib/time.c b/source3/lib/time.c
index 5301e3a55a..f98e03197f 100644
--- a/source3/lib/time.c
+++ b/source3/lib/time.c
@@ -1382,7 +1382,7 @@ void unix_to_nt_time_abs(NTTIME *nt, time_t t)
d = (double)(t);
d *= 1.0e7;
- *nt = d;
+ *nt = (NTTIME)d;
/* convert to a negative value */
*nt=~*nt;
@@ -1443,7 +1443,7 @@ const char *display_time(NTTIME nttime)
low = ~(nttime & 0xFFFFFFFF);
low = low/(1000*1000*10);
- sec=high+low;
+ sec=(int)(high+low);
days=sec/(60*60*24);
hours=(sec - (days*60*60*24)) / (60*60);
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 1a6fb8f93f..0544b3d879 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -471,7 +471,7 @@ struct cli_state *cli_initialise(void)
cli->inbuf = (char *)SMB_MALLOC(cli->bufsize+SAFETY_MARGIN);
cli->oplock_handler = cli_oplock_ack;
cli->case_sensitive = False;
- cli->smb_rw_error = 0;
+ cli->smb_rw_error = SMB_READ_OK;
cli->use_spnego = lp_client_use_spnego();
@@ -606,7 +606,7 @@ void cli_shutdown(struct cli_state *cli)
close(cli->fd);
}
cli->fd = -1;
- cli->smb_rw_error = 0;
+ cli->smb_rw_error = SMB_READ_OK;
SAFE_FREE(cli);
}
diff --git a/source3/rpc_server/srv_dfs_nt.c b/source3/rpc_server/srv_dfs_nt.c
index 8a1cdedb4f..690ddd60d6 100644
--- a/source3/rpc_server/srv_dfs_nt.c
+++ b/source3/rpc_server/srv_dfs_nt.c
@@ -34,7 +34,7 @@ void _dfs_GetManagerVersion(pipes_struct *p, struct dfs_GetManagerVersion *r)
if (lp_host_msdfs()) {
*r->out.version = DFS_MANAGER_VERSION_NT4;
} else {
- *r->out.version = 0;
+ *r->out.version = (enum dfs_ManagerVersion)0;
}
}
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c
index 43f57a0109..3cc2472116 100644
--- a/source3/rpc_server/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srv_srvsvc_nt.c
@@ -2167,7 +2167,7 @@ WERROR _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDESC
r_u->size_secdesc = sd_size;
r_u->sec_desc = psd;
- psd->dacl->revision = (uint16) NT4_ACL_REVISION;
+ psd->dacl->revision = NT4_ACL_REVISION;
unbecome_user();
close_cnum(conn, user.vuid);
diff --git a/source3/rpc_server/srv_winreg_nt.c b/source3/rpc_server/srv_winreg_nt.c
index 873224085c..7dd5268088 100644
--- a/source3/rpc_server/srv_winreg_nt.c
+++ b/source3/rpc_server/srv_winreg_nt.c
@@ -234,7 +234,7 @@ WERROR _winreg_QueryValue(pipes_struct *p, struct winreg_QueryValue *r)
if ( !regkey )
return WERR_BADFID;
- *r->out.value_length = *r->out.type = 0;
+ *r->out.value_length = *r->out.type = REG_NONE;
DEBUG(7,("_reg_info: policy key name = [%s]\n", regkey->key->name));
DEBUG(7,("_reg_info: policy key type = [%08x]\n", regkey->key->type));
diff --git a/source3/rpc_server/srv_wkssvc_nt.c b/source3/rpc_server/srv_wkssvc_nt.c
index 1e43b5ae99..d9d2df344a 100644
--- a/source3/rpc_server/srv_wkssvc_nt.c
+++ b/source3/rpc_server/srv_wkssvc_nt.c
@@ -32,7 +32,7 @@
static void create_wks_info_100(struct wkssvc_NetWkstaInfo100 *info100)
{
- info100->platform_id = 0x000001f4; /* unknown */
+ info100->platform_id = PLATFORM_ID_NT; /* unknown */
info100->version_major = lp_major_announce_version();
info100->version_minor = lp_minor_announce_version();
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 45081808e1..575ca13ff6 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -1163,8 +1163,8 @@ void reply_dskattr(connection_struct *conn, struct smb_request *req)
total_space = dsize * (double)bsize;
free_space = dfree * (double)bsize;
- dsize = (total_space+63*512) / (64*512);
- dfree = (free_space+63*512) / (64*512);
+ dsize = (SMB_BIG_UINT)((total_space+63*512) / (64*512));
+ dfree = (SMB_BIG_UINT)((free_space+63*512) / (64*512));
if (dsize > 0xFFFF) dsize = 0xFFFF;
if (dfree > 0xFFFF) dfree = 0xFFFF;