Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cmake_modules/TokuSetupCompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ function(add_c_defines)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS ${ARGN})
endfunction(add_c_defines)

## always want these
set(CMAKE_C_FLAGS "-Wall -Werror ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "-Wall -Werror ${CMAKE_CXX_FLAGS}")

if (APPLE)
add_c_defines(DARWIN=1 _DARWIN_C_SOURCE)
endif ()
Expand Down Expand Up @@ -170,10 +174,6 @@ if (NOT CMAKE_CXX_COMPILER_ID STREQUAL Clang)
prepend_cflags_if_supported(-Wcast-align)
endif ()

## always want these
set(CMAKE_C_FLAGS "-Wall -Werror ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "-Wall -Werror ${CMAKE_CXX_FLAGS}")

# pick language dialect
set(CMAKE_C_FLAGS "-std=c99 ${CMAKE_C_FLAGS}")
check_cxx_compiler_flag(-std=c++11 HAVE_STDCXX11)
Expand Down
4 changes: 2 additions & 2 deletions portability/tests/test-xid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.

// since we implement the same thing here as in toku_os_gettid, this test
// is pretty pointless
static int gettid(void) {
static int test_gettid(void) {
#if defined(__NR_gettid)
return syscall(__NR_gettid);
#elif defined(SYS_gettid)
Expand All @@ -68,6 +68,6 @@ static int gettid(void) {

int main(void) {
assert(toku_os_getpid() == getpid());
assert(toku_os_gettid() == gettid());
assert(toku_os_gettid() == test_gettid());
return 0;
}
2 changes: 1 addition & 1 deletion src/tests/test_memcmp_magic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ static void test_memcmp_magic_sort_order(void) {
DB_ENV *env;
r = db_env_create(&env, 0); CKERR(r);
r = env->set_default_bt_compare(env, comparison_function_unused); CKERR(r);
r = env->open(env, TOKU_TEST_FILENAME, DB_CREATE+DB_PRIVATE+DB_INIT_MPOOL+DB_INIT_TXN, 0); CKERR(r);
r = env->open(env, TOKU_TEST_FILENAME, DB_CREATE+DB_PRIVATE+DB_INIT_MPOOL+DB_INIT_TXN, S_IRUSR+S_IWUSR); CKERR(r);

const int magic = 49;

Expand Down
4 changes: 2 additions & 2 deletions src/tests/xa-bigtxn-discard-abort.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static void populate_foo(DB_ENV *env, DB_TXN *txn) {
DB *db = nullptr;
r = db_create(&db, env, 0);
CKERR(r);
r = db->open(db, txn, "foo.db", 0, DB_BTREE, 0, 0);
r = db->open(db, txn, "foo.db", 0, DB_BTREE, 0, S_IRWXU);
CKERR(r);

for (int i = 0; i < test_nrows; i++) {
Expand All @@ -81,7 +81,7 @@ static void check_foo(DB_ENV *env, DB_TXN *txn) {
DB *db;
r = db_create(&db, env, 0);
CKERR(r);
r = db->open(db, txn, "foo.db", 0, DB_BTREE, 0, 0);
r = db->open(db, txn, "foo.db", 0, DB_BTREE, 0, S_IRWXU);
CKERR(r);

DBC *c = nullptr;
Expand Down
4 changes: 2 additions & 2 deletions src/tests/xa-bigtxn-discard-commit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static void populate_foo(DB_ENV *env, DB_TXN *txn) {
DB *db = nullptr;
r = db_create(&db, env, 0);
CKERR(r);
r = db->open(db, txn, "foo.db", 0, DB_BTREE, 0, 0);
r = db->open(db, txn, "foo.db", 0, DB_BTREE, 0, S_IRWXU);
CKERR(r);

for (int i = 0; i < test_nrows; i++) {
Expand All @@ -78,7 +78,7 @@ static void check_foo(DB_ENV *env, DB_TXN *txn) {
DB *db;
r = db_create(&db, env, 0);
CKERR(r);
r = db->open(db, txn, "foo.db", 0, DB_BTREE, 0, 0);
r = db->open(db, txn, "foo.db", 0, DB_BTREE, 0, S_IRWXU);
CKERR(r);

DBC *c = nullptr;
Expand Down