summaryrefslogtreecommitdiffstats
path: root/src/usr/trace/daemon
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2013-04-09 15:49:37 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-04-17 15:34:49 -0500
commit198ccaf1e562c281684e47a2209b7ce29c9c71e6 (patch)
treef75d9769bafb3efb814d0149a7971261ab450dab /src/usr/trace/daemon
parent06d989d45066a28d149f15a45301346101eb1006 (diff)
downloadtalos-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/trace/daemon')
-rw-r--r--src/usr/trace/daemon/daemon.C15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/usr/trace/daemon/daemon.C b/src/usr/trace/daemon/daemon.C
index 4e4e8df04..e9062f867 100644
--- a/src/usr/trace/daemon/daemon.C
+++ b/src/usr/trace/daemon/daemon.C
@@ -324,10 +324,12 @@ namespace TRACEDAEMON
iv_curOffset[whichBuffer] = 0;
}
+ trace_bin_entry_t* contEntry =
+ reinterpret_cast<trace_bin_entry_t*>(&whichEntry->data[0]);
+
// Calculate the sizes of the entry.
- size_t contEntryDataLength =
- reinterpret_cast<trace_bin_entry_t*>(&whichEntry->data[0])
- ->head.length + sizeof(trace_bin_entry_t);
+ size_t contEntryDataLength = contEntry->head.length +
+ sizeof(trace_bin_entry_t);
size_t contEntrySize = whichEntry->comp->iv_compNameLen +
contEntryDataLength;
@@ -705,10 +707,11 @@ namespace TRACEDAEMON
if (NULL != entry->comp)
{
+ trace_bin_entry_t* entryBin =
+ reinterpret_cast<trace_bin_entry_t*>(&entry->data[0]);
// Calculate entry size.
- size_t entryDataLength =
- reinterpret_cast<trace_bin_entry_t*>(&entry->data[0])
- ->head.length + sizeof(trace_bin_entry_t);
+ size_t entryDataLength = entryBin->head.length +
+ sizeof(trace_bin_entry_t);
size_t entrySize = entry->comp->iv_compNameLen +
entryDataLength;
OpenPOWER on IntegriCloud