You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by so...@apache.org on 2013/08/17 21:59:18 UTC
[5/5] git commit: TS-302: More cleanups to fix non strict aliasing.
TS-302: More cleanups to fix non strict aliasing.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/4e713d74
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/4e713d74
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/4e713d74
Branch: refs/heads/master
Commit: 4e713d74899929fb3bdef03abe08b29265565152
Parents: 69fe3ee
Author: Phil Sorber <so...@apache.org>
Authored: Sat Aug 17 13:54:15 2013 -0600
Committer: Phil Sorber <so...@apache.org>
Committed: Sat Aug 17 13:54:15 2013 -0600
----------------------------------------------------------------------
lib/ts/test_freelist.cc | 2 +-
proxy/StatSystem.cc | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4e713d74/lib/ts/test_freelist.cc
----------------------------------------------------------------------
diff --git a/lib/ts/test_freelist.cc b/lib/ts/test_freelist.cc
index 12ebefa..677da63 100644
--- a/lib/ts/test_freelist.cc
+++ b/lib/ts/test_freelist.cc
@@ -37,7 +37,7 @@ test(void *d)
int id;
void *m1, *m2, *m3;
- id = *((int *) &d);
+ id = (intptr_t) d;
time_t start = time(NULL);
int count = 0;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4e713d74/proxy/StatSystem.cc
----------------------------------------------------------------------
diff --git a/proxy/StatSystem.cc b/proxy/StatSystem.cc
index ed33cc7..bdde869 100644
--- a/proxy/StatSystem.cc
+++ b/proxy/StatSystem.cc
@@ -607,7 +607,7 @@ dyn_stats_fsum_cb(void *data, void *res)
ink_statval_t count, sum;
READ_DYN_STAT((long) data, count, sum);
(void)count;
- *(float *) res = *(double *) ∑
+ *(float *) res = (double) sum;
return res;
}
@@ -619,7 +619,7 @@ dyn_stats_favg_cb(void *data, void *res)
if (count == 0) {
*(float *) res = 0.0;
} else {
- *(float *) res = *(double *) &sum / *(double *) &count;
+ *(float *) res = (double) sum / (double) count;
}
return res;
}
@@ -730,7 +730,7 @@ http_trans_stats_fsum_cb(void *data, void *res)
ink_statval_t count, sum;
READ_HTTP_TRANS_STAT((long) data, count, sum);
(void)count;
- *(float *) res = *(double *) ∑
+ *(float *) res = (double) sum;
return res;
}
@@ -742,7 +742,7 @@ http_trans_stats_favg_cb(void *data, void *res)
if (count == 0) {
*(float *) res = 0.0;
} else {
- *(float *) res = *(double *) &sum / *(double *) &count;
+ *(float *) res = (double) sum / (double) count;
}
return res;
}