summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-06-16 20:44:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:17:32 -0500
commit4ba1a36d4cb469bffaad86a4620a78d67eeb29ee (patch)
treece380b41b3e9c1537616637a9c9c442f59e90b11 /source3
parent0a5b892aeefdddb11bb64a7e221cafbdbae519d8 (diff)
downloadsamba-4ba1a36d4cb469bffaad86a4620a78d67eeb29ee.tar.gz
samba-4ba1a36d4cb469bffaad86a4620a78d67eeb29ee.tar.bz2
samba-4ba1a36d4cb469bffaad86a4620a78d67eeb29ee.zip
r16299: Fix another "dereferencing type-punned pointer will break
strict-aliasing rules" gcc4 warning. Jeremy. (This used to be commit ee77dde9b6375423f95f31455d06cef7303400be)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_parse/parse_misc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c
index 8cd6553a03..b56f36f590 100644
--- a/source3/rpc_parse/parse_misc.c
+++ b/source3/rpc_parse/parse_misc.c
@@ -1107,6 +1107,7 @@ BOOL smb_io_unistr2(const char *desc, UNISTR2 *uni2, uint32 buffer, prs_struct *
BOOL prs_unistr4(const char *desc, prs_struct *ps, int depth, UNISTR4 *uni4)
{
+ void *ptr;
prs_debug(ps, depth, desc, "prs_unistr4");
depth++;
@@ -1115,9 +1116,13 @@ BOOL prs_unistr4(const char *desc, prs_struct *ps, int depth, UNISTR4 *uni4)
if ( !prs_uint16("size", ps, depth, &uni4->size ))
return False;
- if ( !prs_pointer( desc, ps, depth, (void**)&uni4->string, sizeof(UNISTR2), (PRS_POINTER_CAST)prs_io_unistr2 ) )
+ ptr = uni4->string;
+
+ if ( !prs_pointer( desc, ps, depth, &ptr, sizeof(UNISTR2), (PRS_POINTER_CAST)prs_io_unistr2 ) )
return False;
-
+
+ uni4->string = (UNISTR2 *)ptr;
+
return True;
}