Reduce build warning noise

This commit is contained in:
tian 2026-04-15 10:38:50 +08:00
parent ee4edd2d93
commit 8841f1531b
4 changed files with 12 additions and 27 deletions

View File

@ -111,8 +111,11 @@ if(RK3588_ENABLE_RGA)
else()
message(STATUS "Found librga: ${RK_RGA_LIB}")
target_compile_definitions(media-server PRIVATE RK3588_ENABLE_RGA)
target_include_directories(media-server PRIVATE ${RK_RGA_INCLUDE_DIR})
target_include_directories(media-server SYSTEM PRIVATE ${RK_RGA_INCLUDE_DIR})
target_link_libraries(media-server PRIVATE ${RK_RGA_LIB})
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
target_compile_options(media-server PRIVATE -Wno-pedantic)
endif()
endif()
endif()

View File

@ -224,8 +224,11 @@ if(RK3588_ENABLE_FFMPEG)
endif()
if(RK3588_ENABLE_RGA AND RK_RGA_LIB)
target_compile_definitions(preprocess PRIVATE RK3588_ENABLE_RGA)
target_include_directories(preprocess PRIVATE ${RK_RGA_INCLUDE_DIR})
target_include_directories(preprocess SYSTEM PRIVATE ${RK_RGA_INCLUDE_DIR})
target_link_libraries(preprocess PRIVATE ${RK_RGA_LIB})
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
target_compile_options(preprocess PRIVATE -Wno-pedantic)
endif()
endif()
set_target_properties(preprocess PROPERTIES
OUTPUT_NAME "preprocess"
@ -385,8 +388,11 @@ target_include_directories(osd PRIVATE ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURC
target_link_libraries(osd PRIVATE project_options Threads::Threads)
if(RK3588_ENABLE_RGA AND RK_RGA_LIB)
target_compile_definitions(osd PRIVATE RK3588_ENABLE_RGA)
target_include_directories(osd PRIVATE ${RK_RGA_INCLUDE_DIR})
target_include_directories(osd SYSTEM PRIVATE ${RK_RGA_INCLUDE_DIR})
target_link_libraries(osd PRIVATE ${RK_RGA_LIB})
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
target_compile_options(osd PRIVATE -Wno-pedantic)
endif()
endif()
set_target_properties(osd PROPERTIES
OUTPUT_NAME "osd"

View File

@ -57,26 +57,6 @@ int DefaultContextPoolSize() {
return ClampInt(v, 1, 16);
}
uint32_t TensorTypeSizeBytes(rknn_tensor_type t) {
switch (t) {
case RKNN_TENSOR_INT8:
case RKNN_TENSOR_UINT8:
return 1;
case RKNN_TENSOR_INT16:
case RKNN_TENSOR_UINT16:
case RKNN_TENSOR_FLOAT16:
return 2;
case RKNN_TENSOR_INT32:
case RKNN_TENSOR_UINT32:
case RKNN_TENSOR_FLOAT32:
return 4;
case RKNN_TENSOR_INT64:
return 8;
default:
return 1;
}
}
} // namespace
#endif

View File

@ -70,10 +70,6 @@ SimpleJson DeepMerge(const SimpleJson& base, const SimpleJson& override_v) {
return SimpleJson(std::move(merged));
}
bool HasKey(const SimpleJson& obj, const std::string& key) {
return obj.IsObject() && obj.AsObject().find(key) != obj.AsObject().end();
}
bool ExpandInstances(const SimpleJson& in_root, SimpleJson::Array& out_graphs, std::string& err) {
const SimpleJson* templates_cfg = in_root.Find("templates");
const SimpleJson* instances_cfg = in_root.Find("instances");