Skip to content

Commit 7cbfb8e

Browse files
authored
[error] cast aError to size_t (openthread#11533)
1 parent a2f783e commit 7cbfb8e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/core/common/error.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const char *ErrorToString(Error aError)
8181
"Rejected", // (37) kErrorRejected
8282
};
8383

84-
return aError < GetArrayLength(kErrorStrings) ? kErrorStrings[aError] : "UnknownErrorType";
84+
return static_cast<size_t>(aError) < GetArrayLength(kErrorStrings) ? kErrorStrings[aError] : "UnknownErrorType";
8585
}
8686

8787
} // namespace ot

0 commit comments

Comments
 (0)