diff options
| author | Patrick Williams <iawillia@us.ibm.com> | 2013-04-09 15:49:37 -0500 |
|---|---|---|
| committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-04-17 15:34:49 -0500 |
| commit | 198ccaf1e562c281684e47a2209b7ce29c9c71e6 (patch) | |
| tree | f75d9769bafb3efb814d0149a7971261ab450dab /src/usr/testcore/kernel | |
| parent | 06d989d45066a28d149f15a45301346101eb1006 (diff) | |
| download | talos-hostboot-198ccaf1e562c281684e47a2209b7ce29c9c71e6.tar.gz talos-hostboot-198ccaf1e562c281684e47a2209b7ce29c9c71e6.zip | |
Fix strict-aliasing violations.
Change-Id: I5f3feae4fb62ed82b52e996d4954d1c638a243b3
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/4036
Reviewed-by: Brian H. Horton <brianh@linux.ibm.com>
Tested-by: Jenkins Server
Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/testcore/kernel')
| -rw-r--r-- | src/usr/testcore/kernel/vmmbasetest.H | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/usr/testcore/kernel/vmmbasetest.H b/src/usr/testcore/kernel/vmmbasetest.H index fbfdddf70..15c853268 100644 --- a/src/usr/testcore/kernel/vmmbasetest.H +++ b/src/usr/testcore/kernel/vmmbasetest.H @@ -150,7 +150,16 @@ class VmmBaseTest : public CxxTest::TestSuite static void* writeToKernelCode(void* unused) { - (*(*(uint64_t**)&printk)) = 0x12345678; + uint64_t value = 0x12345678; + + union fn_ptr + { + void (*opd)(const char*, ...); + uint64_t** data; + }; + fn_ptr function = { printk }; + + memcpy(*function.data, &value, sizeof(value)); return NULL; } |

