diff options
author | Jeremy Allison <jra@samba.org> | 2006-06-16 18:42:39 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:17:32 -0500 |
commit | 4b6fef6b6a016aa35637f9f7ebfb6e60f0f24643 (patch) | |
tree | 87bdefcf154188c8b4201b759389c63bf700a729 /source3 | |
parent | 4f3e19950da94c16db384e64523b66961ad671bf (diff) | |
download | samba-4b6fef6b6a016aa35637f9f7ebfb6e60f0f24643.tar.gz samba-4b6fef6b6a016aa35637f9f7ebfb6e60f0f24643.tar.bz2 samba-4b6fef6b6a016aa35637f9f7ebfb6e60f0f24643.zip |
r16295: Fix gcc4 "warning: dereferencing type-punned pointer will break
strict-aliasing rules" warning.
Jeremy.
(This used to be commit 7ac5aee88cae3400fb6400b3628544da2e474560)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/nttrans.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index 17a4a30941..142ff39245 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -914,7 +914,7 @@ create_options = 0x%x root_dir_fid = 0x%x\n", ****************************************************************************/ static int do_nt_transact_create_pipe( connection_struct *conn, char *inbuf, char *outbuf, int length, int bufsize, - char **ppsetup, uint32 setup_count, + uint16 **ppsetup, uint32 setup_count, char **ppparams, uint32 parameter_count, char **ppdata, uint32 data_count) { @@ -1078,7 +1078,7 @@ static struct ea_list *read_nttrans_ea_list(TALLOC_CTX *ctx, const char *pdata, ****************************************************************************/ static int call_nt_transact_create(connection_struct *conn, char *inbuf, char *outbuf, int length, int bufsize, - char **ppsetup, uint32 setup_count, + uint16 **ppsetup, uint32 setup_count, char **ppparams, uint32 parameter_count, char **ppdata, uint32 data_count, uint32 max_data_count) { @@ -1818,11 +1818,11 @@ int reply_ntrename(connection_struct *conn, ****************************************************************************/ static int call_nt_transact_notify_change(connection_struct *conn, char *inbuf, char *outbuf, int length, int bufsize, - char **ppsetup, uint32 setup_count, + uint16 **ppsetup, uint32 setup_count, char **ppparams, uint32 parameter_count, char **ppdata, uint32 data_count, uint32 max_data_count) { - char *setup = *ppsetup; + uint16 *setup = *ppsetup; files_struct *fsp; uint32 flags; @@ -1830,7 +1830,7 @@ static int call_nt_transact_notify_change(connection_struct *conn, char *inbuf, return ERROR_DOS(ERRDOS,ERRbadfunc); } - fsp = file_fsp(setup,4); + fsp = file_fsp((char *)setup,4); flags = IVAL(setup, 0); DEBUG(3,("call_nt_transact_notify_change\n")); @@ -1858,7 +1858,7 @@ name = %s\n", fsp->fsp_name )); ****************************************************************************/ static int call_nt_transact_rename(connection_struct *conn, char *inbuf, char *outbuf, int length, int bufsize, - char **ppsetup, uint32 setup_count, + uint16 **ppsetup, uint32 setup_count, char **ppparams, uint32 parameter_count, char **ppdata, uint32 data_count, uint32 max_data_count) { @@ -1926,7 +1926,7 @@ static size_t get_null_nt_acl(TALLOC_CTX *mem_ctx, SEC_DESC **ppsd) ****************************************************************************/ static int call_nt_transact_query_security_desc(connection_struct *conn, char *inbuf, char *outbuf, int length, int bufsize, - char **ppsetup, uint32 setup_count, + uint16 **ppsetup, uint32 setup_count, char **ppparams, uint32 parameter_count, char **ppdata, uint32 data_count, uint32 max_data_count) { @@ -2042,7 +2042,7 @@ security descriptor.\n")); ****************************************************************************/ static int call_nt_transact_set_security_desc(connection_struct *conn, char *inbuf, char *outbuf, int length, int bufsize, - char **ppsetup, uint32 setup_count, + uint16 **ppsetup, uint32 setup_count, char **ppparams, uint32 parameter_count, char **ppdata, uint32 data_count, uint32 max_data_count) { @@ -2088,7 +2088,7 @@ static int call_nt_transact_set_security_desc(connection_struct *conn, char *inb ****************************************************************************/ static int call_nt_transact_ioctl(connection_struct *conn, char *inbuf, char *outbuf, int length, int bufsize, - char **ppsetup, uint32 setup_count, + uint16 **ppsetup, uint32 setup_count, char **ppparams, uint32 parameter_count, char **ppdata, uint32 data_count, uint32 max_data_count) { @@ -2113,7 +2113,7 @@ static int call_nt_transact_ioctl(connection_struct *conn, char *inbuf, char *ou DEBUG(10,("call_nt_transact_ioctl: function[0x%08X] FID[0x%04X] isFSctl[0x%02X] compfilter[0x%02X]\n", function, fidnum, isFSctl, compfilter)); - fsp=file_fsp(*ppsetup, 4); + fsp=file_fsp((char *)*ppsetup, 4); /* this check is done in each implemented function case for now because I don't want to break anything... --metze FSP_BELONGS_CONN(fsp,conn);*/ @@ -2338,7 +2338,7 @@ static int call_nt_transact_ioctl(connection_struct *conn, char *inbuf, char *ou ****************************************************************************/ static int call_nt_transact_get_user_quota(connection_struct *conn, char *inbuf, char *outbuf, int length, int bufsize, - char **ppsetup, uint32 setup_count, + uint16 **ppsetup, uint32 setup_count, char **ppparams, uint32 parameter_count, char **ppdata, uint32 data_count, uint32 max_data_count) { @@ -2594,7 +2594,7 @@ static int call_nt_transact_get_user_quota(connection_struct *conn, char *inbuf, ****************************************************************************/ static int call_nt_transact_set_user_quota(connection_struct *conn, char *inbuf, char *outbuf, int length, int bufsize, - char **ppsetup, uint32 setup_count, + uint16 **ppsetup, uint32 setup_count, char **ppparams, uint32 parameter_count, char **ppdata, uint32 data_count, uint32 max_data_count) { @@ -2724,7 +2724,7 @@ static int handle_nttrans(connection_struct *conn, START_PROFILE_NESTED(NT_transact_create); outsize = call_nt_transact_create(conn, inbuf, outbuf, size, bufsize, - (char **)&state->setup, state->setup_count, + &state->setup, state->setup_count, &state->param, state->total_param, &state->data, state->total_data, state->max_data_return); @@ -2737,7 +2737,7 @@ static int handle_nttrans(connection_struct *conn, START_PROFILE_NESTED(NT_transact_ioctl); outsize = call_nt_transact_ioctl(conn, inbuf, outbuf, size, bufsize, - (char **)&state->setup, state->setup_count, + &state->setup, state->setup_count, &state->param, state->total_param, &state->data, state->total_data, state->max_data_return); END_PROFILE_NESTED(NT_transact_ioctl); @@ -2749,7 +2749,7 @@ static int handle_nttrans(connection_struct *conn, START_PROFILE_NESTED(NT_transact_set_security_desc); outsize = call_nt_transact_set_security_desc(conn, inbuf, outbuf, size, bufsize, - (char **)&state->setup, state->setup_count, + &state->setup, state->setup_count, &state->param, state->total_param, &state->data, state->total_data, state->max_data_return); END_PROFILE_NESTED(NT_transact_set_security_desc); @@ -2761,7 +2761,7 @@ static int handle_nttrans(connection_struct *conn, START_PROFILE_NESTED(NT_transact_notify_change); outsize = call_nt_transact_notify_change(conn, inbuf, outbuf, size, bufsize, - (char **)&state->setup, state->setup_count, + &state->setup, state->setup_count, &state->param, state->total_param, &state->data, state->total_data, state->max_data_return); END_PROFILE_NESTED(NT_transact_notify_change); @@ -2773,7 +2773,7 @@ static int handle_nttrans(connection_struct *conn, START_PROFILE_NESTED(NT_transact_rename); outsize = call_nt_transact_rename(conn, inbuf, outbuf, size, bufsize, - (char **)&state->setup, state->setup_count, + &state->setup, state->setup_count, &state->param, state->total_param, &state->data, state->total_data, state->max_data_return); END_PROFILE_NESTED(NT_transact_rename); @@ -2785,7 +2785,7 @@ static int handle_nttrans(connection_struct *conn, START_PROFILE_NESTED(NT_transact_query_security_desc); outsize = call_nt_transact_query_security_desc(conn, inbuf, outbuf, size, bufsize, - (char **)&state->setup, state->setup_count, + &state->setup, state->setup_count, &state->param, state->total_param, &state->data, state->total_data, state->max_data_return); END_PROFILE_NESTED(NT_transact_query_security_desc); @@ -2798,7 +2798,7 @@ static int handle_nttrans(connection_struct *conn, START_PROFILE_NESTED(NT_transact_get_user_quota); outsize = call_nt_transact_get_user_quota(conn, inbuf, outbuf, size, bufsize, - (char **)&state->setup, state->setup_count, + &state->setup, state->setup_count, &state->param, state->total_param, &state->data, state->total_data, state->max_data_return); END_PROFILE_NESTED(NT_transact_get_user_quota); @@ -2810,7 +2810,7 @@ static int handle_nttrans(connection_struct *conn, START_PROFILE_NESTED(NT_transact_set_user_quota); outsize = call_nt_transact_set_user_quota(conn, inbuf, outbuf, size, bufsize, - (char **)&state->setup, state->setup_count, + &state->setup, state->setup_count, &state->param, state->total_param, &state->data, state->total_data, state->max_data_return); END_PROFILE_NESTED(NT_transact_set_user_quota); |