summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Bettis <jbettis@google.com>2023-01-11 14:05:24 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-01-11 22:59:19 +0000
commitd4d200d5b06d1ff9a4fcff6af291ed8b265f498b (patch)
treeda37baae557478655741499a54f73624dd7bde8a
parenta6f634403f55da80e677578d689e906d25b405c2 (diff)
downloadchrome-ec-d4d200d5b06d1ff9a4fcff6af291ed8b265f498b.tar.gz
ec: Add #line directive to fix coverage
Once again, gcc is buggy when importing common.h. Add #line to usb_pd_tcpm.h where the problem is showing up today. BRANCH=None BUG=b:265061949 TEST=See bug Change-Id: I08ed9f5574e026dbc371c7634d0bf046df9c95ac Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4157000 Tested-by: Jeremy Bettis <jbettis@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Al Semjonovs <asemjonovs@google.com> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
-rw-r--r--include/usb_pd_tcpm.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/usb_pd_tcpm.h b/include/usb_pd_tcpm.h
index 199682122c..56d0c0abfc 100644
--- a/include/usb_pd_tcpm.h
+++ b/include/usb_pd_tcpm.h
@@ -8,6 +8,13 @@
#ifndef __CROS_EC_USB_PD_TCPM_H
#define __CROS_EC_USB_PD_TCPM_H
+/*
+ * I don't know why but gcc's preprocessor doesn't like this file,
+ * sometimes. Adding a #line directive anywhere in this file seems to fix the
+ * problem. #line marks the *next* line, so it is off by one.
+ */
+#line 17
+
#include "common.h"
#include "compiler.h"
#include "ec_commands.h"