Commit 982acaae authored by Sean Cannella's avatar Sean Cannella Committed by Sara Golemon

OSX compat fixes

Summary:
fix OSX compat issues

Github Author: Daniel Sloof <goapsychadelic@gmail.com>

Test Plan: - compiled

Reviewed By: pt@fb.com

FB internal diff: D877309
parent de064c41
...@@ -57,10 +57,6 @@ ...@@ -57,10 +57,6 @@
#include "folly/Portability.h" #include "folly/Portability.h"
#ifndef _GNU_SOURCE
#define _GNU_SOURCE 1
#endif
#ifndef __GNUC__ #ifndef __GNUC__
#error GCC required #error GCC required
#endif #endif
......
...@@ -639,7 +639,7 @@ bool Dwarf::LineNumberVM::nextDefineFile(folly::StringPiece& program, ...@@ -639,7 +639,7 @@ bool Dwarf::LineNumberVM::nextDefineFile(folly::StringPiece& program,
auto length = readULEB(program); auto length = readULEB(program);
// the opcode itself should be included in the length, so length >= 1 // the opcode itself should be included in the length, so length >= 1
enforce(length != 0, "invalid extended opcode length"); enforce(length != 0, "invalid extended opcode length");
auto extendedOpcode = read<uint8_t>(program); read<uint8_t>(program); // extended opcode
--length; --length;
if (opcode == DW_LNE_define_file) { if (opcode == DW_LNE_define_file) {
......
...@@ -201,7 +201,6 @@ RecordInfo findRecord(ByteRange searchRange, ...@@ -201,7 +201,6 @@ RecordInfo findRecord(ByteRange searchRange,
static const uint32_t magic = Header::kMagic; static const uint32_t magic = Header::kMagic;
static const ByteRange magicRange(reinterpret_cast<const uint8_t*>(&magic), static const ByteRange magicRange(reinterpret_cast<const uint8_t*>(&magic),
sizeof(magic)); sizeof(magic));
static constexpr size_t headerTail = sizeof(Header) - sizeof(magic);
DCHECK_GE(searchRange.begin(), wholeRange.begin()); DCHECK_GE(searchRange.begin(), wholeRange.begin());
DCHECK_LE(searchRange.end(), wholeRange.end()); DCHECK_LE(searchRange.end(), wholeRange.end());
......
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