1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

s3: fix some build warnings.

Guenther
This commit is contained in:
Günther Deschner
2010-04-26 22:09:21 +02:00
parent 7259762909
commit dbfff90185
2 changed files with 9 additions and 9 deletions

View File

@ -321,7 +321,7 @@ int cli_NetGroupAdd(struct cli_state *cli, struct rap_group_info_1 *grinfo)
PUTWORD(p, 0); /* reserved word 0 */ PUTWORD(p, 0); /* reserved word 0 */
p = data; p = data;
PUTSTRINGF(p, grinfo->group_name, RAP_GROUPNAME_LEN); PUTSTRINGF(p, (const char *)grinfo->group_name, RAP_GROUPNAME_LEN);
PUTBYTE(p, 0); /* pad byte 0 */ PUTBYTE(p, 0); /* pad byte 0 */
PUTSTRINGP(p, grinfo->comment, data, soffset); PUTSTRINGP(p, grinfo->comment, data, soffset);
@ -864,16 +864,16 @@ int cli_NetUserAdd(struct cli_state *cli, struct rap_user_info_1 * userinfo )
PUTWORD(p, 1); /* info level */ PUTWORD(p, 1); /* info level */
PUTWORD(p, 0); /* pwencrypt */ PUTWORD(p, 0); /* pwencrypt */
if(userinfo->passwrd) if(userinfo->passwrd)
PUTWORD(p,MIN(strlen(userinfo->passwrd), RAP_UPASSWD_LEN)); PUTWORD(p,MIN(strlen((const char *)userinfo->passwrd), RAP_UPASSWD_LEN));
else else
PUTWORD(p, 0); /* password length */ PUTWORD(p, 0); /* password length */
p = data; p = data;
memset(data, '\0', soffset); memset(data, '\0', soffset);
PUTSTRINGF(p, userinfo->user_name, RAP_USERNAME_LEN); PUTSTRINGF(p, (const char *)userinfo->user_name, RAP_USERNAME_LEN);
PUTBYTE(p, 0); /* pad byte 0 */ PUTBYTE(p, 0); /* pad byte 0 */
PUTSTRINGF(p, userinfo->passwrd, RAP_UPASSWD_LEN); PUTSTRINGF(p, (const char *)userinfo->passwrd, RAP_UPASSWD_LEN);
PUTDWORD(p, 0); /* pw age - n.a. on user add */ PUTDWORD(p, 0); /* pw age - n.a. on user add */
PUTWORD(p, userinfo->priv); PUTWORD(p, userinfo->priv);
PUTSTRINGP(p, userinfo->home_dir, data, soffset); PUTSTRINGP(p, userinfo->home_dir, data, soffset);
@ -1366,7 +1366,7 @@ int cli_NetShareAdd(struct cli_state *cli, struct rap_share_info_2 * sinfo )
PUTWORD(p, 0); /* reserved word 0 */ PUTWORD(p, 0); /* reserved word 0 */
p = data; p = data;
PUTSTRINGF(p, sinfo->share_name, RAP_SHARENAME_LEN); PUTSTRINGF(p, (const char *)sinfo->share_name, RAP_SHARENAME_LEN);
PUTBYTE(p, 0); /* pad byte 0 */ PUTBYTE(p, 0); /* pad byte 0 */
PUTWORD(p, sinfo->share_type); PUTWORD(p, sinfo->share_type);
@ -1375,7 +1375,7 @@ int cli_NetShareAdd(struct cli_state *cli, struct rap_share_info_2 * sinfo )
PUTWORD(p, sinfo->maximum_users); PUTWORD(p, sinfo->maximum_users);
PUTWORD(p, sinfo->active_users); PUTWORD(p, sinfo->active_users);
PUTSTRINGP(p, sinfo->path, data, soffset); PUTSTRINGP(p, sinfo->path, data, soffset);
PUTSTRINGF(p, sinfo->password, RAP_SPASSWD_LEN); PUTSTRINGF(p, (const char *)sinfo->password, RAP_SPASSWD_LEN);
SCVAL(p,-1,0x0A); /* required 0x0A at end of password */ SCVAL(p,-1,0x0A); /* required 0x0A at end of password */
if (cli_api(cli, if (cli_api(cli,

View File

@ -246,7 +246,7 @@ static int rap_share_add(struct net_context *c, int argc, const char **argv)
return net_rap_share_usage(c, argc, argv); return net_rap_share_usage(c, argc, argv);
} }
*p = 0; *p = 0;
strlcpy(sinfo.share_name, sharename, sizeof(sinfo.share_name)); strlcpy((char *)sinfo.share_name, sharename, sizeof(sinfo.share_name));
sinfo.reserved1 = '\0'; sinfo.reserved1 = '\0';
sinfo.share_type = 0; sinfo.share_type = 0;
sinfo.comment = smb_xstrdup(c->opt_comment); sinfo.comment = smb_xstrdup(c->opt_comment);
@ -822,7 +822,7 @@ static int rap_user_add(struct net_context *c, int argc, const char **argv)
if (!NT_STATUS_IS_OK(net_make_ipc_connection(c, 0, &cli))) if (!NT_STATUS_IS_OK(net_make_ipc_connection(c, 0, &cli)))
return -1; return -1;
safe_strcpy(userinfo.user_name, argv[0], sizeof(userinfo.user_name)-1); safe_strcpy((char *)userinfo.user_name, argv[0], sizeof(userinfo.user_name)-1);
if (c->opt_flags == -1) if (c->opt_flags == -1)
c->opt_flags = 0x21; c->opt_flags = 0x21;
@ -967,7 +967,7 @@ static int rap_group_add(struct net_context *c, int argc, const char **argv)
return -1; return -1;
/* BB check for length 21 or smaller explicitly ? BB */ /* BB check for length 21 or smaller explicitly ? BB */
safe_strcpy(grinfo.group_name, argv[0], sizeof(grinfo.group_name)-1); safe_strcpy((char *)grinfo.group_name, argv[0], sizeof(grinfo.group_name)-1);
grinfo.reserved1 = '\0'; grinfo.reserved1 = '\0';
grinfo.comment = smb_xstrdup(c->opt_comment ? c->opt_comment : ""); grinfo.comment = smb_xstrdup(c->opt_comment ? c->opt_comment : "");