Skip to content

Commit

Permalink
disable -Wextra for lmdb
Browse files Browse the repository at this point in the history
  • Loading branch information
pstorz authored and arogge committed Nov 2, 2022
1 parent c12f184 commit 23bafa0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
6 changes: 5 additions & 1 deletion core/CMakeLists.txt
Expand Up @@ -54,6 +54,8 @@ endif(CCACHE_FOUND)
#
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wextra")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra")

option(ENABLE_SANITIZERS "Build with ASan/LSan/UBSan enabled" OFF)
if(ENABLE_SANITIZERS)
Expand Down Expand Up @@ -339,7 +341,9 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
include_directories(/usr/local/include)
link_directories(/usr/local/lib)
link_libraries(intl)
check_cxx_compiler_flag(-Wunused-but-set-variable compiler_will_warn_of_unused_but_set_variable)
check_cxx_compiler_flag(
-Wunused-but-set-variable compiler_will_warn_of_unused_but_set_variable
)
endif()

if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
Expand Down
2 changes: 1 addition & 1 deletion core/src/lmdb/CMakeLists.txt
Expand Up @@ -23,7 +23,7 @@ if(HAVE_FREEBSD_OS)
endif()

add_library(bareoslmdb SHARED mdb.c midl.c)
target_compile_options(bareoslmdb PRIVATE -Wno-missing-braces)
target_compile_options(bareoslmdb PRIVATE -Wno-missing-braces -Wno-extra)

# set target_link_options so lto doesn't complain either
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
Expand Down
3 changes: 1 addition & 2 deletions core/src/lmdb/mdb.c
Expand Up @@ -7370,7 +7370,6 @@ mdb_cursor_put(MDB_cursor *mc, MDB_val *key, MDB_val *data,
break;
}
/* FALLTHRU: Big enough MDB_DUPFIXED sub-page */
[[fallthrough]];
case MDB_CURRENT:
fp->mp_flags |= P_DIRTY;
COPY_PGNO(fp->mp_pgno, mp->mp_pgno);
Expand Down Expand Up @@ -10698,7 +10697,7 @@ int mdb_set_relctx(MDB_txn *txn, MDB_dbi dbi, void *ctx)
}

int ESECT
mdb_env_get_maxkeysize([[maybe_unused]]MDB_env *env)
mdb_env_get_maxkeysize(MDB_env *env)
{
return ENV_MAXKEY(env);
}
Expand Down

0 comments on commit 23bafa0

Please sign in to comment.