From 982acaae2b98b489e407adc4db700530f98a52fb Mon Sep 17 00:00:00 2001 From: Sean Cannella Date: Mon, 15 Jul 2013 08:32:29 -0700 Subject: [PATCH] OSX compat fixes Summary: fix OSX compat issues Github Author: Daniel Sloof Test Plan: - compiled Reviewed By: pt@fb.com FB internal diff: D877309 --- folly/Bits.h | 4 ---- folly/experimental/symbolizer/Dwarf.cpp | 2 +- folly/io/RecordIO.cpp | 1 - 3 files changed, 1 insertion(+), 6 deletions(-) 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()); -- 2.34.1