From 43125eee6c7177455935e512d02c7d29297bd219 Mon Sep 17 00:00:00 2001 From: Daisuke Nishimatsu <42202095+wep21@users.noreply.github.com> Date: Mon, 25 Apr 2022 10:56:49 +0900 Subject: [PATCH] fix(system_monitor): modify build error in rolling (#788) Signed-off-by: wep21 --- system/system_monitor/CMakeLists.txt | 2 +- .../system_monitor/src/gpu_monitor/nvml_gpu_monitor.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/system/system_monitor/CMakeLists.txt b/system/system_monitor/CMakeLists.txt index 1ff6f95b28ccc..e7b08ad33f75b 100644 --- a/system/system_monitor/CMakeLists.txt +++ b/system/system_monitor/CMakeLists.txt @@ -8,7 +8,7 @@ if(NOT CMAKE_CXX_STANDARD) set(CMAKE_CXX_EXTENSIONS OFF) endif() if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") - add_compile_options(-Wall -Wextra -Wpedantic -Werror) + add_compile_options(-Wall -Wextra -Wpedantic -Werror -Wno-stringop-truncation) endif() find_package(ament_cmake_auto REQUIRED) diff --git a/system/system_monitor/src/gpu_monitor/nvml_gpu_monitor.cpp b/system/system_monitor/src/gpu_monitor/nvml_gpu_monitor.cpp index 19026717bc77b..4cf035dffd556 100644 --- a/system/system_monitor/src/gpu_monitor/nvml_gpu_monitor.cpp +++ b/system/system_monitor/src/gpu_monitor/nvml_gpu_monitor.cpp @@ -183,10 +183,10 @@ void GPUMonitor::addProcessUsage( uint32_t info_count = MAX_ARRAY_SIZE; std::unique_ptr infos; infos = std::make_unique(MAX_ARRAY_SIZE); - ret = nvmlDeviceGetComputeRunningProcesses_v2(device, &info_count, infos.get()); + ret = nvmlDeviceGetComputeRunningProcesses(device, &info_count, infos.get()); if (ret != NVML_SUCCESS) { RCLCPP_WARN( - this->get_logger(), "Failed to nvmlDeviceGetComputeRunningProcesses_v2 NVML: %s", + this->get_logger(), "Failed to nvmlDeviceGetComputeRunningProcesses NVML: %s", nvmlErrorString(ret)); return; } @@ -197,10 +197,10 @@ void GPUMonitor::addProcessUsage( // Get Graphics Process ID info_count = MAX_ARRAY_SIZE; infos = std::make_unique(MAX_ARRAY_SIZE); - ret = nvmlDeviceGetGraphicsRunningProcesses_v2(device, &info_count, infos.get()); + ret = nvmlDeviceGetGraphicsRunningProcesses(device, &info_count, infos.get()); if (ret != NVML_SUCCESS) { RCLCPP_WARN( - this->get_logger(), "Failed to nvmlDeviceGetGraphicsRunningProcesses_v2 NVML: %s", + this->get_logger(), "Failed to nvmlDeviceGetGraphicsRunningProcesses NVML: %s", nvmlErrorString(ret)); return; }