Skip to content

Commit

Permalink
Merge pull request google#412 from pwnall/fix_warn
Browse files Browse the repository at this point in the history
Fix unused variable warning in GCC
  • Loading branch information
sergiud authored Dec 31, 2018
2 parents d5f57a2 + 99749d4 commit 9a30104
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/logging.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1221,14 +1221,14 @@ void LogMessage::Init(const char* file,
allocated_ = NULL;
if (severity != GLOG_FATAL || !exit_on_dfatal) {
#ifdef GLOG_THREAD_LOCAL_STORAGE
const uintptr_t kAlign = sizeof(void*) - 1;

// No need for locking, because this is thread local.
if (thread_data_available) {
thread_data_available = false;
#ifdef HAVE_ALIGNED_STORAGE
data_ = new (&thread_msg_data) LogMessageData;
#else
const uintptr_t kAlign = sizeof(void*) - 1;

char* align_ptr =
reinterpret_cast<char*>(reinterpret_cast<uintptr_t>(thread_msg_data + kAlign) & ~kAlign);
data_ = new (align_ptr) LogMessageData;
Expand Down

0 comments on commit 9a30104

Please sign in to comment.