summaryrefslogtreecommitdiff
path: root/include/config.h
diff options
context:
space:
mode:
authorJeremy Bettis <jbettis@google.com>2022-12-01 10:19:55 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-12-01 19:07:48 +0000
commitc752ac38da75d7b5f2f4362f7d84bb0c38860eae (patch)
tree2bedb99f93893f866bacc62e9ab93e8d4f3bca3b /include/config.h
parent7f6f66043aef3910364f95eecca7760f5b4d3c51 (diff)
downloadchrome-ec-c752ac38da75d7b5f2f4362f7d84bb0c38860eae.tar.gz
ec: Move #line directive to config.h
Previously #line was added to config_chip to fix off-by-one errors in the coverage reports. This came up again, and this time adding the #line directive to config.h fixed it. That seems like a better place anyway since nearly every file includes it. BRANCH=None BUG=b:260765255 TEST=Ran build_firmware.py with coverage to verify 291 lines of incorrectly marked lines of code removed. Change-Id: I647887df1373708e7c2e70cce777de7f1458875d Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4071386 Commit-Queue: Yuval Peress <peress@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Yuval Peress <peress@google.com>
Diffstat (limited to 'include/config.h')
-rw-r--r--include/config.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h
index 8d78921cde..544fe7c333 100644
--- a/include/config.h
+++ b/include/config.h
@@ -19,6 +19,13 @@
#define __CROS_EC_CONFIG_H
/*
+ * I don't know why but gcc's preprocessor doesn't like the autoconf.h 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 27
+
+/*
* When building for Zephyr tests, a shimmed_tasks.h header is defined
* to create all the HAS_TASK_* definitions. Since those are used in
* config.h, we need to include that header first.