mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-24 14:17:52 -05:00
clang: Fix compile warnings and add sanitizer supressions
This commit is contained in:
1 parent
3fa94f3b17
commit
4d24b019dc
3 files changed
+83
-2
No files matched your search
@@ -559,7 +559,17 @@ list(APPEND THIRD_PARTY_LIBRARIES NRLib)
|
||||
# ##############################################################################
|
||||
|
||||
add_definitions(-DOPENZGY_STATIC)
|
||||
|
||||
# Suppress CMake deprecation warnings from openzgy/zfp's old CMakeLists.txt
|
||||
set(CMAKE_WARN_DEPRECATED
|
||||
OFF
|
||||
CACHE BOOL "" FORCE
|
||||
)
|
||||
add_subdirectory(ThirdParty/openzgy)
|
||||
set(CMAKE_WARN_DEPRECATED
|
||||
ON
|
||||
CACHE BOOL "" FORCE
|
||||
)
|
||||
|
||||
list(APPEND THIRD_PARTY_LIBRARIES openzgy)
|
||||
set_property(TARGET zfp PROPERTY FOLDER "Thirdparty")
|
||||
@@ -706,8 +716,24 @@ list(APPEND THIRD_PARTY_LIBRARIES FastFloat::fast_float spdlog::spdlog)
|
||||
find_package(Arrow CONFIG REQUIRED)
|
||||
if(MSVC)
|
||||
list(APPEND THIRD_PARTY_LIBRARIES Arrow::arrow_shared)
|
||||
# Treat Arrow headers as system headers to suppress warnings from third-party
|
||||
# code
|
||||
set_target_properties(
|
||||
Arrow::arrow_shared
|
||||
PROPERTIES
|
||||
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES
|
||||
$<TARGET_PROPERTY:Arrow::arrow_shared,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
)
|
||||
else()
|
||||
list(APPEND THIRD_PARTY_LIBRARIES Arrow::arrow_static)
|
||||
# Treat Arrow headers as system headers to suppress warnings from third-party
|
||||
# code
|
||||
set_target_properties(
|
||||
Arrow::arrow_static
|
||||
PROPERTIES
|
||||
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES
|
||||
$<TARGET_PROPERTY:Arrow::arrow_static,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
)
|
||||
endif()
|
||||
|
||||
# ##############################################################################
|
||||
@@ -716,8 +742,24 @@ endif()
|
||||
find_package(Parquet CONFIG REQUIRED)
|
||||
if(MSVC)
|
||||
list(APPEND THIRD_PARTY_LIBRARIES Parquet::parquet_shared)
|
||||
# Treat Parquet headers as system headers to suppress warnings from
|
||||
# third-party code
|
||||
set_target_properties(
|
||||
Parquet::parquet_shared
|
||||
PROPERTIES
|
||||
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES
|
||||
$<TARGET_PROPERTY:Parquet::parquet_shared,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
)
|
||||
else()
|
||||
list(APPEND THIRD_PARTY_LIBRARIES Parquet::parquet_static)
|
||||
# Treat Parquet headers as system headers to suppress warnings from
|
||||
# third-party code
|
||||
set_target_properties(
|
||||
Parquet::parquet_static
|
||||
PROPERTIES
|
||||
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES
|
||||
$<TARGET_PROPERTY:Parquet::parquet_static,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
)
|
||||
endif()
|
||||
|
||||
# ##############################################################################
|
||||
|
||||
@@ -92,9 +92,9 @@ QWidget* PdmUiLineEditor::createEditorWidget( QWidget* parent )
|
||||
{
|
||||
if ( !uiFieldHandle ) return false;
|
||||
|
||||
if ( uiFieldHandle->fieldHandle() )
|
||||
if ( auto fieldHandle = uiFieldHandle->fieldHandle() )
|
||||
{
|
||||
const std::type_info& typeInfo = typeid( *uiFieldHandle->fieldHandle() );
|
||||
const std::type_info& typeInfo = typeid( *fieldHandle );
|
||||
QString typeName = QString( typeInfo.name() );
|
||||
|
||||
return typeName.contains( "optional", Qt::CaseInsensitive );
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
# ASan Leak Suppression File for ResInsight
|
||||
# This file suppresses known leaks in third-party libraries that are not part of ResInsight
|
||||
#
|
||||
# System Information:
|
||||
# OS: Ubuntu 24.04.2 LTS
|
||||
# Kernel: Linux 6.6.87.2-microsoft-standard-WSL2
|
||||
# Compiler: Ubuntu clang version 19.1.1 (1ubuntu1~24.04.2)
|
||||
# Generated: 2025-10-17
|
||||
#
|
||||
# Usage:
|
||||
# Set the LSAN_OPTIONS environment variable before running tests or the application:
|
||||
# export LSAN_OPTIONS=suppressions=/home/builder/gitroot/ResInsight/tooling/sanitizers/asan_suppressions.txt
|
||||
#
|
||||
# Or run directly with:
|
||||
# LSAN_OPTIONS=suppressions=/home/builder/gitroot/ResInsight/tooling/sanitizers/asan_suppressions.txt ./build/clang/ResInsight
|
||||
#
|
||||
# For CMake/CTest:
|
||||
# LSAN_OPTIONS=suppressions=/home/builder/gitroot/ResInsight/tooling/sanitizers/asan_suppressions.txt ctest
|
||||
|
||||
# Qt Wayland platform plugin - known leak in wp_viewporter initialization
|
||||
leak:libwayland-client.so
|
||||
leak:libQt6WaylandClient.so
|
||||
|
||||
# Wayland proxy marshalling functions
|
||||
leak:wl_proxy_marshal_array_flags
|
||||
leak:wl_proxy_marshal_constructor_versioned
|
||||
|
||||
# Dynamic library loading leaks during initialization
|
||||
leak:call_init
|
||||
leak:_dl_init
|
||||
leak:dl_open_worker
|
||||
leak:_dl_open
|
||||
leak:dlopen
|
||||
|
||||
# Aligned memory allocation leaks from unknown modules (likely third-party libraries)
|
||||
leak:aligned_alloc
|
||||
|
||||
# pthread condition variable leaks from system libraries
|
||||
leak:pthread_cond_broadcast
|
||||
Reference in new issue
Block a user