|
From: <sv...@va...> - 2008-10-12 19:51:03
|
Author: njn
Date: 2008-10-12 20:50:51 +0100 (Sun, 12 Oct 2008)
New Revision: 8665
Log:
Avoid warnings caused by mixed decls and code.
Modified:
trunk/exp-ptrcheck/tests/unaligned.c
Modified: trunk/exp-ptrcheck/tests/unaligned.c
===================================================================
--- trunk/exp-ptrcheck/tests/unaligned.c 2008-10-11 23:32:26 UTC (rev 8664)
+++ trunk/exp-ptrcheck/tests/unaligned.c 2008-10-12 19:50:51 UTC (rev 8665)
@@ -10,11 +10,16 @@
char c0[8], c1[8], c2[8], c3[8], c4[8];
// Each of these pointers has a different alignment
- char** p0 = (char**)&c0[0]; *p0 = x;
- char** p1 = (char**)&c1[1]; *p1 = x;
- char** p2 = (char**)&c2[2]; *p2 = x;
- char** p3 = (char**)&c3[3]; *p3 = x;
- char** p4 = (char**)&c4[4]; *p4 = x;
+ char** p0 = (char**)&c0[0];
+ char** p1 = (char**)&c1[1];
+ char** p2 = (char**)&c2[2];
+ char** p3 = (char**)&c3[3];
+ char** p4 = (char**)&c4[4];
+ *p0 = x;
+ *p1 = x;
+ *p2 = x;
+ *p3 = x;
+ *p4 = x;
// These 10 are ok
c = (*p0)[0];
|