From e0a4e5ab99a45faa196b3894ade8c375061a7ab6 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 30 Apr 2021 16:24:50 -0700 Subject: 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 Change-Id: I5c25440819428db65225c772c1c5115a735db58a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2864519 Reviewed-by: Daisuke Nojiri --- util/comm-lpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/comm-lpc.c') diff --git a/util/comm-lpc.c b/util/comm-lpc.c index a3a8f64ff7..d1ce761fc2 100644 --- a/util/comm-lpc.c +++ b/util/comm-lpc.c @@ -225,7 +225,7 @@ static int ec_command_lpc_3(int command, int version, static int ec_readmem_lpc(int offset, int bytes, void *dest) { int i = offset; - char *s = dest; + char *s = (char *)(dest); int cnt = 0; if (offset >= EC_MEMMAP_SIZE - bytes) -- cgit v1.2.1