Skip to content

Commit

Permalink
[Warnings] Fix some warnings found while compiling with xcode (#11576)
Browse files Browse the repository at this point in the history
  • Loading branch information
vivien-apple authored and pull[bot] committed May 31, 2022
1 parent d40e43a commit 1458180
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 46 deletions.
18 changes: 9 additions & 9 deletions src/app/CommandSender.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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) {}

Expand Down
2 changes: 1 addition & 1 deletion src/app/MessageDef/AttributeDataIB.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/app/MessageDef/AttributePathIB.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/app/MessageDef/EventDataIB.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
16 changes: 8 additions & 8 deletions src/app/MessageDef/EventPathIB.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
*/
Expand All @@ -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
*/
Expand Down
2 changes: 1 addition & 1 deletion src/app/MessageDef/InvokeResponseIB.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
28 changes: 14 additions & 14 deletions src/app/ReadClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}

Expand All @@ -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)
Expand All @@ -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) {}

Expand All @@ -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) {}

Expand All @@ -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;
};
Expand Down
14 changes: 7 additions & 7 deletions src/app/WriteClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}

Expand All @@ -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) {}

Expand All @@ -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;
};
Expand Down
6 changes: 4 additions & 2 deletions src/inet/UDPEndPoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,21 @@ class DLL_EXPORT UDPEndPoint : public EndPointBasis, public ReferenceCounted<UDP
* member to process message text reception events on \c endPoint where
* \c msg is the message text received from the sender at \c senderAddr.
*/
using OnMessageReceivedFunct = void (*)(UDPEndPoint *, chip::System::PacketBufferHandle &&, const IPPacketInfo *);
using OnMessageReceivedFunct = void (*)(UDPEndPoint * endPoint, chip::System::PacketBufferHandle && msg,
const IPPacketInfo * pktInfo);

/**
* Type of reception error event handling function.
*
* @param[in] endPoint The endpoint associated with the event.
* @param[in] err The reason for the error.
* @param[in] pktInfo The packet's IP information.
*
* Provide a function of this type to the \c OnReceiveError delegate
* member to process reception error events on \c endPoint. The \c err
* argument provides specific detail about the type of the error.
*/
using OnReceiveErrorFunct = void (*)(UDPEndPoint *, CHIP_ERROR, const IPPacketInfo *);
using OnReceiveErrorFunct = void (*)(UDPEndPoint * endPoint, CHIP_ERROR err, const IPPacketInfo * pktInfo);

/**
* Set whether IP multicast traffic should be looped back.
Expand Down
2 changes: 1 addition & 1 deletion src/system/SystemObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ class ObjectPoolStatic
*
* @param[in] aStartIndex The index to start counting from; pass 0 to count over
* the whole pool.
* @param[in/out] aNumInUse The number of objects in use. If aStartIndex is not 0,
* @param[in,out] aNumInUse The number of objects in use. If aStartIndex is not 0,
* the function adds to the counter without resetting it first.
*/
void GetNumObjectsInUse(size_t aStartIndex, size_t & aNumInUse)
Expand Down

0 comments on commit 1458180

Please sign in to comment.