svn commit: samba r16754 - in trunk/source: lib locking
vlendec at samba.org
vlendec at samba.org
Sat Jul 1 23:56:09 GMT 2006
Author: vlendec
Date: 2006-07-01 23:56:09 +0000 (Sat, 01 Jul 2006)
New Revision: 16754
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16754
Log:
Some more warnings
Modified:
trunk/source/lib/popt_common.c
trunk/source/locking/locking.c
Changeset:
Modified: trunk/source/lib/popt_common.c
===================================================================
--- trunk/source/lib/popt_common.c 2006-07-01 22:38:42 UTC (rev 16753)
+++ trunk/source/lib/popt_common.c 2006-07-01 23:56:09 UTC (rev 16754)
@@ -123,7 +123,7 @@
}
struct poptOption popt_common_connection[] = {
- { NULL, 0, POPT_ARG_CALLBACK, popt_common_callback },
+ { NULL, 0, POPT_ARG_CALLBACK, (void *)popt_common_callback },
{ "socket-options", 'O', POPT_ARG_STRING, NULL, 'O', "socket options to use",
"SOCKETOPTIONS" },
{ "netbiosname", 'n', POPT_ARG_STRING, NULL, 'n', "Primary netbios name", "NETBIOSNAME" },
@@ -134,7 +134,7 @@
};
struct poptOption popt_common_samba[] = {
- { NULL, 0, POPT_ARG_CALLBACK|POPT_CBFLAG_PRE, popt_common_callback },
+ { NULL, 0, POPT_ARG_CALLBACK|POPT_CBFLAG_PRE, (void *)popt_common_callback },
{ "debuglevel", 'd', POPT_ARG_STRING, NULL, 'd', "Set debug level", "DEBUGLEVEL" },
{ "configfile", 's', POPT_ARG_STRING, NULL, 's', "Use alternate configuration file", "CONFIGFILE" },
{ "log-basename", 'l', POPT_ARG_STRING, NULL, 'l', "Base name for log files", "LOGFILEBASE" },
@@ -143,7 +143,7 @@
};
struct poptOption popt_common_version[] = {
- { NULL, 0, POPT_ARG_CALLBACK, popt_common_callback },
+ { NULL, 0, POPT_ARG_CALLBACK, (void *)popt_common_callback },
{ "version", 'V', POPT_ARG_NONE, NULL, 'V', "Print version" },
POPT_TABLEEND
};
@@ -248,7 +248,7 @@
const struct poptOption popt_common_dynconfig[] = {
- { NULL, '\0', POPT_ARG_CALLBACK, popt_dynconfig_callback },
+ { NULL, '\0', POPT_ARG_CALLBACK, (void *)popt_dynconfig_callback },
{ "sbindir", '\0' , POPT_ARG_STRING, NULL, DYN_SBINDIR,
"Path to sbin directory", "SBINDIR" },
@@ -515,7 +515,7 @@
struct poptOption popt_common_credentials[] = {
- { NULL, 0, POPT_ARG_CALLBACK|POPT_CBFLAG_PRE, popt_common_credentials_callback },
+ { NULL, 0, POPT_ARG_CALLBACK|POPT_CBFLAG_PRE, (void *)popt_common_credentials_callback },
{ "user", 'U', POPT_ARG_STRING, NULL, 'U', "Set the network username", "USERNAME" },
{ "no-pass", 'N', POPT_ARG_NONE, &cmdline_auth_info.got_pass, 0, "Don't ask for a password" },
{ "kerberos", 'k', POPT_ARG_NONE, &cmdline_auth_info.use_kerberos, 'k', "Use kerberos (active directory) authentication" },
Modified: trunk/source/locking/locking.c
===================================================================
--- trunk/source/locking/locking.c 2006-07-01 22:38:42 UTC (rev 16753)
+++ trunk/source/locking/locking.c 2006-07-01 23:56:09 UTC (rev 16754)
@@ -516,9 +516,10 @@
smb_panic("PANIC: parse_share_modes: buffer too short.\n");
}
- lck->share_modes = talloc_memdup(lck, dbuf.dptr+sizeof(*data),
- lck->num_share_modes *
- sizeof(struct share_mode_entry));
+ lck->share_modes = (struct share_mode_entry *)
+ talloc_memdup(lck, dbuf.dptr+sizeof(*data),
+ lck->num_share_modes *
+ sizeof(struct share_mode_entry));
if (lck->share_modes == NULL) {
smb_panic("talloc failed\n");
@@ -635,7 +636,7 @@
delete_token_size +
sp_len + 1 +
strlen(lck->filename) + 1;
- result.dptr = talloc_size(lck, result.dsize);
+ result.dptr = TALLOC_ARRAY(lck, char, result.dsize);
if (result.dptr == NULL) {
smb_panic("talloc failed\n");
@@ -838,7 +839,7 @@
msg_len = MSG_FILE_RENAMED_MIN_SIZE + sp_len + 1 + fn_len + 1;
/* Set up the name changed message. */
- frm = TALLOC(lck, msg_len);
+ frm = TALLOC_ARRAY(lck, char, msg_len);
if (!frm) {
return False;
}
@@ -1305,5 +1306,5 @@
{
if (tdb == NULL)
return 0;
- return tdb_traverse(tdb, traverse_fn, fn);
+ return tdb_traverse(tdb, traverse_fn, (void *)fn);
}
More information about the samba-cvs
mailing list