From 2c591ffcc1cc86dae1f51e3fdc43acf65c28c2df Mon Sep 17 00:00:00 2001 From: "Mewar, Deepak" Date: Wed, 19 Feb 2025 03:50:28 +0530 Subject: [PATCH] [SWDEV-499995] ESMI Build/Compiler warnings messages (#105) * [SWDEV-499995] ESMI Build/Compiler warnings messages Signed-off-by: Deepak Mewar --- include/amd_smi/amdsmi.h | 4 ++-- py-interface/amdsmi_wrapper.py | 4 ++-- src/amd_smi/amd_smi_drm.cc | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/amd_smi/amdsmi.h b/include/amd_smi/amdsmi.h index 4120ed0296..5c5e111826 100644 --- a/include/amd_smi/amdsmi.h +++ b/include/amd_smi/amdsmi.h @@ -251,8 +251,8 @@ typedef void *amdsmi_cpusocket_handle; * @cond @tag{cpu_bm} @endcond */ typedef struct { - uint8_t major; //!< Major version number - uint8_t minor; //!< Minor version number + uint32_t major; //!< Major version number + uint32_t minor; //!< Minor version number } amdsmi_hsmp_driver_version_t; #endif diff --git a/py-interface/amdsmi_wrapper.py b/py-interface/amdsmi_wrapper.py index f6f12dfaf5..47186d6f83 100644 --- a/py-interface/amdsmi_wrapper.py +++ b/py-interface/amdsmi_wrapper.py @@ -227,8 +227,8 @@ class struct_amdsmi_hsmp_driver_version_t(Structure): struct_amdsmi_hsmp_driver_version_t._pack_ = 1 # source:False struct_amdsmi_hsmp_driver_version_t._fields_ = [ - ('major', ctypes.c_ubyte), - ('minor', ctypes.c_ubyte), + ('major', ctypes.c_uint32), + ('minor', ctypes.c_uint32), ] amdsmi_hsmp_driver_version_t = struct_amdsmi_hsmp_driver_version_t diff --git a/src/amd_smi/amd_smi_drm.cc b/src/amd_smi/amd_smi_drm.cc index 55f0ffb010..c007c0983d 100644 --- a/src/amd_smi/amd_smi_drm.cc +++ b/src/amd_smi/amd_smi_drm.cc @@ -38,11 +38,11 @@ namespace amd { namespace smi { +void closedir(DIR* /*ptr*/) {} + std::string AMDSmiDrm::find_file_in_folder(const std::string& folder, const std::string& regex) { std::string file_name; - // TODO: The closedir function has some non-standard attributes that are being ignored here - // which is causing a warning to be thrown using dir_ptr = std::unique_ptr; struct dirent *dir = nullptr;