From 9b8847beea2b06e1fbea06d3cbee8adb2ff996ae Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Tue, 9 Nov 2021 14:52:57 +0100 Subject: [PATCH] [Warnings] Fix some warnings found while compiling with xcode (#11576) --- src/app/CommandSender.h | 18 ++++++++--------- src/app/MessageDef/AttributeDataIB.h | 2 +- src/app/MessageDef/AttributePathIB.h | 4 ++-- src/app/MessageDef/EventDataIB.h | 2 +- src/app/MessageDef/EventPathIB.h | 16 +++++++-------- src/app/MessageDef/InvokeResponseIB.h | 2 +- src/app/ReadClient.h | 28 +++++++++++++-------------- src/app/WriteClient.h | 14 +++++++------- src/inet/UDPEndPoint.h | 6 ++++-- src/system/SystemObject.h | 2 +- 10 files changed, 48 insertions(+), 46 deletions(-) diff --git a/src/app/CommandSender.h b/src/app/CommandSender.h index 04ee3f9092b620..f582a9fce97b68 100644 --- a/src/app/CommandSender.h +++ b/src/app/CommandSender.h @@ -64,12 +64,12 @@ class CommandSender final : public Command, public Messaging::ExchangeDelegate * The CommandSender object MUST continue to exist after this call is completed. The application shall wait until it * receives an OnDone call to destroy the object. * - * @param[in] apCommandSender: The command sender object that initiated the command transaction. - * @param[in] aPath: The command path field in invoke command response. - * @param[in] aStatusIB: It will always have a success status. If apData is null, it can be any success status, including - * possibly a cluster-specific one. If apData is not null it aStatusIB will always be a generic - * SUCCESS status with no-cluster specific information. - * @param[in] aData: The command data, will be nullptr if the server returns a StatusIB. + * @param[in] apCommandSender The command sender object that initiated the command transaction. + * @param[in] aPath The command path field in invoke command response. + * @param[in] aStatusIB It will always have a success status. If apData is null, it can be any success status, + * including possibly a cluster-specific one. If apData is not null it aStatusIB will always + * be a generic SUCCESS status with no-cluster specific information. + * @param[in] aData The command data, will be nullptr if the server returns a StatusIB. */ virtual void OnResponse(CommandSender * apCommandSender, const ConcreteCommandPath & aPath, const StatusIB & aStatusIB, TLV::TLVReader * apData) @@ -89,9 +89,9 @@ class CommandSender final : public Command, public Messaging::ExchangeDelegate * The CommandSender object MUST continue to exist after this call is completed. The application shall wait until it * receives an OnDone call to destroy and free the object. * - * @param[in] apCommandSender: The command sender object that initiated the command transaction. - * @param[in] aStatusIB: The status code including IM status code and optional cluster status code - * @param[in] aError: A system error code that conveys the overall error code. + * @param[in] apCommandSender The command sender object that initiated the command transaction. + * @param[in] aStatusIB The status code including IM status code and optional cluster status code + * @param[in] aError A system error code that conveys the overall error code. */ virtual void OnError(const CommandSender * apCommandSender, const StatusIB & aStatusIB, CHIP_ERROR aError) {} diff --git a/src/app/MessageDef/AttributeDataIB.h b/src/app/MessageDef/AttributeDataIB.h index a4144c4374d276..7327f38692bba9 100644 --- a/src/app/MessageDef/AttributeDataIB.h +++ b/src/app/MessageDef/AttributeDataIB.h @@ -79,7 +79,7 @@ class Parser : public StructParser * #CHIP_ERROR_WRONG_TLV_TYPE if there is such element but it's not a Path * #CHIP_END_OF_TLV if there is no such element */ - CHIP_ERROR GetPath(AttributePathIB::Parser * const apPath) const; + CHIP_ERROR GetPath(AttributePathIB::Parser * const apAttributePath) const; /** * @brief Get a TLVReader for the Data. Next() must be called before accessing them. diff --git a/src/app/MessageDef/AttributePathIB.h b/src/app/MessageDef/AttributePathIB.h index 4ac86981b0e55c..c07b1026126f6b 100644 --- a/src/app/MessageDef/AttributePathIB.h +++ b/src/app/MessageDef/AttributePathIB.h @@ -63,7 +63,7 @@ class Parser : public ListParser /** * @brief Get the EnableTagCompression * - * @param [in] apNodeId A pointer to apNodeId + * @param [in] apEnableTagCompression A pointer to apEnableTagCompression * * @return #CHIP_NO_ERROR on success * #CHIP_ERROR_WRONG_TLV_TYPE if there is such element but it's not boolean types @@ -80,7 +80,7 @@ class Parser : public ListParser * #CHIP_ERROR_WRONG_TLV_TYPE if there is such element but it's not any of the defined unsigned integer types * #CHIP_END_OF_TLV if there is no such element */ - CHIP_ERROR GetNode(NodeId * const apNode) const; + CHIP_ERROR GetNode(NodeId * const apNodeId) const; /** * @brief Get the Endpoint. diff --git a/src/app/MessageDef/EventDataIB.h b/src/app/MessageDef/EventDataIB.h index 3e63b7eb5f8db4..700e0da810ead1 100644 --- a/src/app/MessageDef/EventDataIB.h +++ b/src/app/MessageDef/EventDataIB.h @@ -175,7 +175,7 @@ class Builder : public StructBuilder * @brief Inject PriorityLevel into the TLV stream to indicate the priority level associated with * the cluster that is referenced by the path. * - * @param [in] aPriorityLevel This is an integer representation of the priority level. + * @param [in] aPriority This is an integer representation of the priority level. * * @return A reference to *this */ diff --git a/src/app/MessageDef/EventPathIB.h b/src/app/MessageDef/EventPathIB.h index 8b2d6a1fe486ad..95cc79c9cffcda 100644 --- a/src/app/MessageDef/EventPathIB.h +++ b/src/app/MessageDef/EventPathIB.h @@ -90,7 +90,7 @@ class Parser : public ListParser /** * @brief Get a TLVReader for the ClusterId. Next() must be called before accessing them. * - * @param [in] apClusterId A pointer to apClusterId + * @param [in] apCluster A pointer to apCluster * * @return #CHIP_NO_ERROR on success * #CHIP_ERROR_WRONG_TLV_TYPE if there is such element but it's not any of the defined unsigned integer types @@ -101,7 +101,7 @@ class Parser : public ListParser /** * @brief Get a TLVReader for the EventId. Next() must be called before accessing them. * - * @param [in] apEventId A pointer to apEventId + * @param [in] apEvent A pointer to apEvent * * @return #CHIP_NO_ERROR on success * #CHIP_ERROR_WRONG_TLV_TYPE if there is such element but it's not any of the defined unsigned integer types @@ -110,9 +110,9 @@ class Parser : public ListParser CHIP_ERROR GetEvent(EventId * const apEvent) const; /** - * @brief Get a TLVReader for the EventId. Next() must be called before accessing them. + * @brief Get a TLVReader for the bool isUrgent. Next() must be called before accessing them. * - * @param [in] apEventId A pointer to apEventId + * @param [in] apISUrgent A pointer to apIsUrgent * * @return #CHIP_NO_ERROR on success * #CHIP_ERROR_WRONG_TLV_TYPE if there is such element but it's not any of the defined unsigned integer types @@ -136,7 +136,7 @@ class Builder : public ListBuilder /** * @brief Inject Endpoint into the TLV stream. * - * @param [in] aEndpoint EndpointId for this eevent path + * @param [in] aEndpoint EndpointId for this event path * * @return A reference to *this */ @@ -154,16 +154,16 @@ class Builder : public ListBuilder /** * @brief Inject Event into the TLV stream. * - * @param [in] aEvent ClusterId for this event path + * @param [in] aEvent EventId for this event path * * @return A reference to *this */ EventPathIB::Builder & Event(const EventId aEvent); /** - * @brief Inject EventId into the TLV stream. + * @brief Inject urgent boolean into the TLV stream. * - * @param [in] aEventId ClusterId for this event path + * @param [in] aIsUrgent boolean for this event path * * @return A reference to *this */ diff --git a/src/app/MessageDef/InvokeResponseIB.h b/src/app/MessageDef/InvokeResponseIB.h index 83de7bc7810b14..83e935ce6cfc07 100644 --- a/src/app/MessageDef/InvokeResponseIB.h +++ b/src/app/MessageDef/InvokeResponseIB.h @@ -71,7 +71,7 @@ class Parser : public StructParser /** * @brief Get a parser for a Status. * - * @param [in] apCommand A pointer to the CommandStatusIB parser. + * @param [in] apStatus A pointer to the CommandStatusIB parser. * * @return #CHIP_NO_ERROR on success * #CHIP_END_OF_TLV if there is no such element diff --git a/src/app/ReadClient.h b/src/app/ReadClient.h index bdfba725964cda..3e678746b0df30 100644 --- a/src/app/ReadClient.h +++ b/src/app/ReadClient.h @@ -63,11 +63,11 @@ class ReadClient : public Messaging::ExchangeDelegate * Notification that a list of events is received on the given read client. * The ReadClient object MUST continue to exist after this call is completed. * - * @param[in] apReadClient The read client which initialized the read transaction. - * @param[in] apEventReportsReader TLV reader positioned at the list that contains the events. The - * implementation of EventStreamReceived is expected to call Next() on the reader to - * advance it to the first element of the list, then process the elements from beginning to - * the end. The callee is expected to consume all events. + * @param[in] apReadClient The read client which initialized the read transaction. + * @param[in] apEventReportsReader TLV reader positioned at the list that contains the events. The + * implementation of EventStreamReceived is expected to call Next() on the reader to + * advance it to the first element of the list, then process the elements from beginning to + * the end. The callee is expected to consume all events. */ virtual void OnEventData(const ReadClient * apReadClient, TLV::TLVReader & aEventReports) {} @@ -81,11 +81,11 @@ class ReadClient : public Messaging::ExchangeDelegate * - Receiving attribute data as reports of subscriptions * - Receiving attribute data as initial reports of subscriptions * - * @param[in] apReadClient: The read client object that initiated the read or subscribe transaction. - * @param[in] aPath: The attribute path field in report response. - * @param[in] apData: The attribute data of the given path, will be a nullptr if status is not Success. - * @param[in] aStatus: Attribute-specific status, containing an InteractionModel::Status code as well as an optional - * cluster-specific status code. + * @param[in] apReadClient The read client object that initiated the read or subscribe transaction. + * @param[in] aPath The attribute path field in report response. + * @param[in] apData The attribute data of the given path, will be a nullptr if status is not Success. + * @param[in] aStatus Attribute-specific status, containing an InteractionModel::Status code as well as an + * optional cluster-specific status code. */ virtual void OnAttributeData(const ReadClient * apReadClient, const ConcreteAttributePath & aPath, TLV::TLVReader * apData, const StatusIB & aStatus) @@ -97,7 +97,7 @@ class ReadClient : public Messaging::ExchangeDelegate * The ReadClient object MUST continue to exist after this call is completed. The application shall wait until it * receives an OnDone call before it shuts down the object. * - * @param[in] apReadClient: The read client object that initiated the read transaction. + * @param[in] apReadClient The read client object that initiated the read transaction. */ virtual void OnSubscriptionEstablished(const ReadClient * apReadClient) {} @@ -112,8 +112,8 @@ class ReadClient : public Messaging::ExchangeDelegate * The ReadClient object MUST continue to exist after this call is completed. The application shall wait until it * receives an OnDone call before it shuts down the object. * - * @param[in] apReadClient: The read client object that initiated the attribute read transaction. - * @param[in] aError: A system error code that conveys the overall error code. + * @param[in] apReadClient The read client object that initiated the attribute read transaction. + * @param[in] aError A system error code that conveys the overall error code. */ virtual void OnError(const ReadClient * apReadClient, CHIP_ERROR aError) {} @@ -126,7 +126,7 @@ class ReadClient : public Messaging::ExchangeDelegate * - Be called even in error circumstances. * - Only be called after a successful call to SendWriteRequest as been made. * - * @param[in] apReadClient: The read client object of the terminated read transaction. + * @param[in] apReadClient The read client object of the terminated read transaction. */ virtual void OnDone(ReadClient * apReadClient) = 0; }; diff --git a/src/app/WriteClient.h b/src/app/WriteClient.h index 050aef4b558a38..cb7b1562873608 100644 --- a/src/app/WriteClient.h +++ b/src/app/WriteClient.h @@ -66,10 +66,10 @@ class WriteClient : public Messaging::ExchangeDelegate * The WriteClient object MUST continue to exist after this call is completed. The application shall wait until it * receives an OnDone call before it shuts down the object. * - * @param[in] apWriteClient: The write client object that initiated the write transaction. - * @param[in] aPath: The attribute path field in write response. - * @param[in] attributeStatus: Attribute-specific status, containing an InteractionModel::Status code as well as - * an optional cluster-specific status code. + * @param[in] apWriteClient The write client object that initiated the write transaction. + * @param[in] aPath The attribute path field in write response. + * @param[in] attributeStatus Attribute-specific status, containing an InteractionModel::Status code as well as + * an optional cluster-specific status code. */ virtual void OnResponse(const WriteClient * apWriteClient, const ConcreteAttributePath & aPath, StatusIB attributeStatus) {} @@ -84,8 +84,8 @@ class WriteClient : public Messaging::ExchangeDelegate * The WriteClient object MUST continue to exist after this call is completed. The application shall wait until it * receives an OnDone call before it shuts down the object. * - * @param[in] apWriteClient: The write client object that initiated the attribute write transaction. - * @param[in] aError: A system error code that conveys the overall error code. + * @param[in] apWriteClient The write client object that initiated the attribute write transaction. + * @param[in] aError A system error code that conveys the overall error code. */ virtual void OnError(const WriteClient * apWriteClient, CHIP_ERROR aError) {} @@ -98,7 +98,7 @@ class WriteClient : public Messaging::ExchangeDelegate * - Be called even in error circumstances. * - Only be called after a successful call to SendWriteRequest as been made. * - * @param[in] apWriteClient: The write client object of the terminated write transaction. + * @param[in] apWriteClient The write client object of the terminated write transaction. */ virtual void OnDone(WriteClient * apWriteClient) = 0; }; diff --git a/src/inet/UDPEndPoint.h b/src/inet/UDPEndPoint.h index ae2ad58c357b7d..1b5f3c79648eb0 100644 --- a/src/inet/UDPEndPoint.h +++ b/src/inet/UDPEndPoint.h @@ -81,19 +81,21 @@ class DLL_EXPORT UDPEndPoint : public EndPointBasis, public ReferenceCounted