summaryrefslogtreecommitdiff
path: root/include/usb_pd_tcpm.h
diff options
context:
space:
mode:
authorTom Hughes <tomhughes@chromium.org>2021-04-30 16:24:50 -0700
committerCommit Bot <commit-bot@chromium.org>2021-05-06 17:29:59 +0000
commite0a4e5ab99a45faa196b3894ade8c375061a7ab6 (patch)
treeb20a581a87a8c8513068280cad1c496d7f472137 /include/usb_pd_tcpm.h
parent1f4c9670318eca8c6b7bdc674fa2a4930e21a5c4 (diff)
downloadchrome-ec-e0a4e5ab99a45faa196b3894ade8c375061a7ab6.tar.gz
util: Add explicit casts
When compiling with C++, the implicit casting that is performed in C is disallowed. Add casts in preparation for C++ compatibility. BRANCH=none BUG=b:144959033 TEST=make buildall Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I5c25440819428db65225c772c1c5115a735db58a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2864519 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'include/usb_pd_tcpm.h')
-rw-r--r--include/usb_pd_tcpm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/usb_pd_tcpm.h b/include/usb_pd_tcpm.h
index fddcb04c3a..700b1d0fcd 100644
--- a/include/usb_pd_tcpm.h
+++ b/include/usb_pd_tcpm.h
@@ -61,7 +61,7 @@ static inline enum tcpc_cc_polarity polarity_rm_dts(
enum tcpc_cc_polarity polarity)
{
BUILD_ASSERT(POLARITY_COUNT == 4);
- return polarity & BIT(0);
+ return (enum tcpc_cc_polarity)(polarity & BIT(0));
}
enum tcpm_transmit_type {