From 3c1ed3bb2731b49249d6aaacf01248783e4c8bf6 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 16 Dec 2022 22:46:47 -0500 Subject: [PATCH] initial_pins: Add check to reduce compile time size when not in use Add a check to the start of initial_pins_setup() to make it easier for gcc to optimize the code if it is not in use. Signed-off-by: Kevin O'Connor --- src/initial_pins.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/initial_pins.c b/src/initial_pins.c index cd478508..af01b3ac 100644 --- a/src/initial_pins.c +++ b/src/initial_pins.c @@ -16,6 +16,8 @@ DECL_CTR("DECL_INITIAL_PINS " __stringify(CONFIG_INITIAL_PINS)); void initial_pins_setup(void) { + if (sizeof(CONFIG_INITIAL_PINS) <= 1) + return; int i; for (i=0; i