Skip to content

Commit

Permalink
update: reduce nonnull warnings
Browse files Browse the repository at this point in the history
Signed-off-by: shouren <[email protected]>
  • Loading branch information
Shouren committed Dec 23, 2024
1 parent 64a2369 commit 66567a2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,13 @@ on:

env:
GIT_SUBMODULE_STRATEGY: recursive
NPROC: 5 # default Parallel build number for GitHub's Linux runner
NPROC: 2 # default Parallel build number for GitHub's Linux runner
EXAMPLES_ENABLE: OFF # turn off hybridse's example code
HYBRIDSE_TESTING_ENABLE: OFF # turn off hybridse's test code
# ref https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

jobs:
openmldb-test-python:
runs-on: [self-hosted,generic]
env:
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
container:
image: ghcr.io/4paradigm/hybridsql:latest
steps:
Expand Down
7 changes: 7 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,17 @@ function(compile_lib LIB_NAME DIR DEPEND_FILE_LIST)
set(FILE_STR_LIST "${FILE_STR_LIST} ${DEPEND_FILE_LIST}")
string(REPLACE " " ";" FILE_LIST ${FILE_STR_LIST})
add_library(${LIB_NAME} STATIC ${FILE_LIST} $<TARGET_OBJECTS:openmldb_proto>)

# TODO: Fix me after upgrade Boost or fix nonnull errors in Boost
target_compile_options(${LIB_NAME} PRIVATE
$<$<COMPILE_LANGUAGE:CXX>:-Wno-error=nonnull>
$<$<COMPILE_LANGUAGE:C>:-Wno-error=nonnull>
)
target_compile_options(${LIB_NAME} PRIVATE
$<$<COMPILE_LANGUAGE:CXX>:-Wno-nonnull>
$<$<COMPILE_LANGUAGE:C>:-Wno-nonnull>
)

endfunction(compile_lib)

set(TEST_LIBS
Expand Down
8 changes: 7 additions & 1 deletion src/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@
# WARN: do not link in production

add_library(openmldb_test_base base_test.cc util.cc)
target_compile_options(openmldb_test_base PRIVATE

# TODO: Fix me after upgrade Boost or fix nonnull errors in Boost
target_compile_options(${LIB_NAME} PRIVATE
$<$<COMPILE_LANGUAGE:CXX>:-Wno-error=nonnull>
$<$<COMPILE_LANGUAGE:C>:-Wno-error=nonnull>
)
target_compile_options(${LIB_NAME} PRIVATE
$<$<COMPILE_LANGUAGE:CXX>:-Wno-nonnull>
$<$<COMPILE_LANGUAGE:C>:-Wno-nonnull>
)

add_dependencies(openmldb_test_base openmldb_sdk tablet nameserver)
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.1")
Expand Down

0 comments on commit 66567a2

Please sign in to comment.