You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2016/01/13 02:02:37 UTC

[2/2] trafficserver git commit: TS-3072: fix newer compiler warnings.

TS-3072: fix newer compiler warnings.

(cherry picked from commit 7cd050790b4cc6a85becebef7438e01f267f0bd3)


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/51faf6ee
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/51faf6ee
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/51faf6ee

Branch: refs/heads/6.1.x
Commit: 51faf6ee98c351a2f1b545183e463e4fcde1d38f
Parents: 230d255
Author: shinrich <sh...@yahoo-inc.com>
Authored: Tue Jan 12 17:50:34 2016 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Tue Jan 12 15:59:22 2016 -0800

----------------------------------------------------------------------
 lib/ts/ContFlags.cc | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/51faf6ee/lib/ts/ContFlags.cc
----------------------------------------------------------------------
diff --git a/lib/ts/ContFlags.cc b/lib/ts/ContFlags.cc
index 6f564b6..4e37e5e 100644
--- a/lib/ts/ContFlags.cc
+++ b/lib/ts/ContFlags.cc
@@ -39,33 +39,35 @@ void
 init_cont_flags()
 {
   ContFlags new_flags;
-  ink_thread_setspecific(flags_data_key, (void *)new_flags.get_flags());
+  void *val = reinterpret_cast<void *>(static_cast<intptr_t>((new_flags.get_flags())));
+  ink_thread_setspecific(flags_data_key, val);
 }
 
 void
 set_cont_flags(const ContFlags &flags)
 {
-  ink_thread_setspecific(flags_data_key, (void *)flags.get_flags());
+  void *val = reinterpret_cast<void *>(static_cast<intptr_t>((flags.get_flags())));
+  ink_thread_setspecific(flags_data_key, val);
 }
 
 void
 set_cont_flag(ContFlags::flags flag_bit, bool value)
 {
-  u_int64_t flags = (u_int64_t)ink_thread_getspecific(flags_data_key);
-  ContFlags new_flags(flags);
+  ContFlags new_flags(reinterpret_cast<intptr_t>(ink_thread_getspecific(flags_data_key)));
   new_flags.set_flag(flag_bit, value);
-  ink_thread_setspecific(flags_data_key, (void *)new_flags.get_flags());
+  void *val = reinterpret_cast<void *>(static_cast<intptr_t>((new_flags.get_flags())));
+  ink_thread_setspecific(flags_data_key, val);
 }
 
 ContFlags
 get_cont_flags()
 {
-  return ContFlags((u_int64_t)ink_thread_getspecific(flags_data_key));
+  return ContFlags(reinterpret_cast<intptr_t>(ink_thread_getspecific(flags_data_key)));
 }
 
 bool
 get_cont_flag(ContFlags::flags flag_bit)
 {
-  ContFlags flags((u_int64_t)ink_thread_getspecific(flags_data_key));
+  ContFlags flags(reinterpret_cast<intptr_t>(ink_thread_getspecific(flags_data_key)));
   return flags.get_flag(flag_bit);
 }