svn commit: samba r16299 - in branches/SAMBA_3_0/source/rpc_parse: .
jra at samba.org
jra at samba.org
Fri Jun 16 20:44:49 GMT 2006
Author: jra
Date: 2006-06-16 20:44:49 +0000 (Fri, 16 Jun 2006)
New Revision: 16299
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16299
Log:
Fix another "dereferencing type-punned pointer will break
strict-aliasing rules" gcc4 warning.
Jeremy.
Modified:
branches/SAMBA_3_0/source/rpc_parse/parse_misc.c
Changeset:
Modified: branches/SAMBA_3_0/source/rpc_parse/parse_misc.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_parse/parse_misc.c 2006-06-16 18:50:01 UTC (rev 16298)
+++ branches/SAMBA_3_0/source/rpc_parse/parse_misc.c 2006-06-16 20:44:49 UTC (rev 16299)
@@ -1107,6 +1107,7 @@
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 @@
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;
}
More information about the samba-cvs
mailing list