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

trafficserver git commit: TS-3072: fix newer compiler warnings.

Repository: trafficserver
Updated Branches:
  refs/heads/master a0081119c -> 7cd050790


TS-3072: fix newer compiler warnings.


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

Branch: refs/heads/master
Commit: 7cd050790b4cc6a85becebef7438e01f267f0bd3
Parents: a008111
Author: shinrich <sh...@yahoo-inc.com>
Authored: Tue Jan 12 17:50:34 2016 -0600
Committer: shinrich <sh...@yahoo-inc.com>
Committed: Tue Jan 12 17:50:34 2016 -0600

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


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7cd05079/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);
 }