Turn off -Wshadow
Summary: So glibc is not -Wshadow-safe, so we need to turn it off :( error: ‘int sigaction(int, const sigaction*, sigaction*)’ hides constructor for ‘struct sigaction’ The rest of the changes in this diff is that we include .h files under rocksdb namespace, which is a no-no. Test Plan: compiles now Reviewers: ljin, yhchiang, rven, sdong Reviewed By: sdong Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D28413
This commit is contained in:
parent
9f20395cd6
commit
5fd33d26f1
2
Makefile
2
Makefile
@ -69,7 +69,7 @@ install:
|
||||
@[ ! -e $(SHARED) ] || install -C -m 644 $(SHARED) $(INSTALL_PATH)/lib
|
||||
#-------------------------------------------------
|
||||
|
||||
WARNING_FLAGS = -Wall -Werror -Wsign-compare -Wshadow
|
||||
WARNING_FLAGS = -Wall -Werror -Wsign-compare
|
||||
CFLAGS += $(WARNING_FLAGS) -I. -I./include $(PLATFORM_CCFLAGS) $(OPT)
|
||||
CXXFLAGS += $(WARNING_FLAGS) -I. -I./include $(PLATFORM_CXXFLAGS) $(OPT) -Woverloaded-virtual
|
||||
|
||||
|
@ -5,15 +5,16 @@
|
||||
//
|
||||
#include "port/stack_trace.h"
|
||||
|
||||
namespace rocksdb {
|
||||
namespace port {
|
||||
|
||||
#if defined(ROCKSDB_LITE) || !(defined(OS_LINUX) || defined(OS_MACOSX))
|
||||
|
||||
// noop
|
||||
|
||||
namespace rocksdb {
|
||||
namespace port {
|
||||
void InstallStackTraceHandler() {}
|
||||
void PrintStack(int first_frames_to_skip) {}
|
||||
} // namespace port
|
||||
} // namespace rocksdb
|
||||
|
||||
#else
|
||||
|
||||
@ -25,6 +26,9 @@ void PrintStack(int first_frames_to_skip) {}
|
||||
#include <unistd.h>
|
||||
#include <cxxabi.h>
|
||||
|
||||
namespace rocksdb {
|
||||
namespace port {
|
||||
|
||||
namespace {
|
||||
|
||||
#ifdef OS_LINUX
|
||||
@ -126,7 +130,7 @@ void InstallStackTraceHandler() {
|
||||
signal(SIGABRT, StackTraceHandler);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace port
|
||||
} // namespace rocksdb
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user