From 463fc4bb7307b189a726179c6561ff23a5382327 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Thu, 20 Nov 2025 11:12:03 -0700 Subject: [PATCH] Enable -Wdocumentation and fix issues --- cmake/AISClangCompilerOptions.cmake | 2 +- rocfile/src/backend.h | 2 +- rocfile/src/batch/batch.h | 8 ++++---- rocfile/src/context.h | 2 +- rocfile/src/state.h | 2 -- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/cmake/AISClangCompilerOptions.cmake b/cmake/AISClangCompilerOptions.cmake index 532e46c0..b91c9362 100644 --- a/cmake/AISClangCompilerOptions.cmake +++ b/cmake/AISClangCompilerOptions.cmake @@ -35,7 +35,7 @@ function(get_ais_clang_warning_flags outvar compiler_version) -Wthread-safety # Turn this on later (generates a lot of noise now) - #-Wdocumentation + -Wdocumentation # Avoid things that will cause problems on Windows -Wmicrosoft diff --git a/rocfile/src/backend.h b/rocfile/src/backend.h index 35884333..d681800d 100644 --- a/rocfile/src/backend.h +++ b/rocfile/src/backend.h @@ -38,7 +38,7 @@ struct Backend { /// @param size The IO request's size /// @param file_offset Offset from the start of the file /// @param buffer_offset Offset from the start of the buffer - /// @return + /// @return The eagerness "score" virtual int score(std::shared_ptr file, std::shared_ptr buffer, size_t size, hoff_t file_offset, hoff_t buffer_offset) const = 0; diff --git a/rocfile/src/batch/batch.h b/rocfile/src/batch/batch.h index 0d4cb31d..54923941 100644 --- a/rocfile/src/batch/batch.h +++ b/rocfile/src/batch/batch.h @@ -70,8 +70,8 @@ class BatchContext : public IBatchContext { /// /// @brief Submit one or more operations to this Context. - /// @param [in] ops Pointer to the operations to enqueue. - /// @param [in] num_ops Number of operations to enqueue. + /// @param [in] params Pointer to the operations to enqueue. + /// @param [in] num_params Number of operations to enqueue. /// /// @note This is an All or None operation. If one submitted operation is not valid, no operations /// will be submitted. @@ -107,13 +107,13 @@ class BatchContextMap { /*! * @brief Destroy a batch context and release all associated resources - * @param batch_handle The handle for the batch context to destroy + * @param handle The handle for the batch context to destroy */ void destroyContext(rocFileBatchHandle_t handle); /*! * @brief Get a batch context - * @param batch_handle The opaque handle associated with a batch context + * @param handle The opaque handle associated with a batch context * @return A batch context */ std::shared_ptr get(rocFileBatchHandle_t handle); diff --git a/rocfile/src/context.h b/rocfile/src/context.h index 83df9e53..c3e12ee0 100644 --- a/rocfile/src/context.h +++ b/rocfile/src/context.h @@ -41,7 +41,7 @@ template struct Context { private: /// @brief Set a context to temporarily override the default - /// @param _current A pointer to the new context + /// @param _replacement A pointer to the replacement context static void override(T *_replacement) { std::lock_guard lock{m}; diff --git a/rocfile/src/state.h b/rocfile/src/state.h index 287d3a60..665df1bd 100644 --- a/rocfile/src/state.h +++ b/rocfile/src/state.h @@ -160,9 +160,7 @@ class DriverState { /// Like the buffer getter, this function emits a temporary unregistered buffer /// (of size length, using flags) if no matching buffer is found. /// - /// @param [out] outFile File object /// @param [in] fh File handle - /// @param [out] outBuf Registered or temporary unregistered Buffer object /// @param [in] buf Buffer pointer /// @param [in] length Buffer length /// @param [in] flags Buffer flags (unused)