From: Sean Cannella Date: Mon, 15 Jul 2013 15:32:29 +0000 (-0700) Subject: OSX compat fixes X-Git-Tag: v0.22.0~925 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=982acaae2b98b489e407adc4db700530f98a52fb;p=folly.git OSX compat fixes Summary: fix OSX compat issues Github Author: Daniel Sloof Test Plan: - compiled Reviewed By: pt@fb.com FB internal diff: D877309 --- diff --git a/folly/Bits.h b/folly/Bits.h index 0b45f84f..2b522524 100644 --- a/folly/Bits.h +++ b/folly/Bits.h @@ -57,10 +57,6 @@ #include "folly/Portability.h" -#ifndef _GNU_SOURCE -#define _GNU_SOURCE 1 -#endif - #ifndef __GNUC__ #error GCC required #endif diff --git a/folly/experimental/symbolizer/Dwarf.cpp b/folly/experimental/symbolizer/Dwarf.cpp index fd78907c..7ad5af1d 100644 --- a/folly/experimental/symbolizer/Dwarf.cpp +++ b/folly/experimental/symbolizer/Dwarf.cpp @@ -639,7 +639,7 @@ bool Dwarf::LineNumberVM::nextDefineFile(folly::StringPiece& program, auto length = readULEB(program); // the opcode itself should be included in the length, so length >= 1 enforce(length != 0, "invalid extended opcode length"); - auto extendedOpcode = read(program); + read(program); // extended opcode --length; if (opcode == DW_LNE_define_file) { diff --git a/folly/io/RecordIO.cpp b/folly/io/RecordIO.cpp index 566ce365..a4075057 100644 --- a/folly/io/RecordIO.cpp +++ b/folly/io/RecordIO.cpp @@ -201,7 +201,6 @@ RecordInfo findRecord(ByteRange searchRange, static const uint32_t magic = Header::kMagic; static const ByteRange magicRange(reinterpret_cast(&magic), sizeof(magic)); - static constexpr size_t headerTail = sizeof(Header) - sizeof(magic); DCHECK_GE(searchRange.begin(), wholeRange.begin()); DCHECK_LE(searchRange.end(), wholeRange.end());