Commit 0989ffad authored by Victor Costan's avatar Victor Costan

Fix unused variable warning in GCC.

parent 6deff5ab
...@@ -1221,14 +1221,14 @@ void LogMessage::Init(const char* file, ...@@ -1221,14 +1221,14 @@ void LogMessage::Init(const char* file,
allocated_ = NULL; allocated_ = NULL;
if (severity != GLOG_FATAL || !exit_on_dfatal) { if (severity != GLOG_FATAL || !exit_on_dfatal) {
#ifdef GLOG_THREAD_LOCAL_STORAGE #ifdef GLOG_THREAD_LOCAL_STORAGE
const uintptr_t kAlign = sizeof(void*) - 1;
// No need for locking, because this is thread local. // No need for locking, because this is thread local.
if (thread_data_available) { if (thread_data_available) {
thread_data_available = false; thread_data_available = false;
#ifdef HAVE_ALIGNED_STORAGE #ifdef HAVE_ALIGNED_STORAGE
data_ = new (&thread_msg_data) LogMessageData; data_ = new (&thread_msg_data) LogMessageData;
#else #else
const uintptr_t kAlign = sizeof(void*) - 1;
char* align_ptr = char* align_ptr =
reinterpret_cast<char*>(reinterpret_cast<uintptr_t>(thread_msg_data + kAlign) & ~kAlign); reinterpret_cast<char*>(reinterpret_cast<uintptr_t>(thread_msg_data + kAlign) & ~kAlign);
data_ = new (align_ptr) LogMessageData; data_ = new (align_ptr) LogMessageData;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment