From 351ddaf8e1731ac8dc7f304a594ad738e197a6bb Mon Sep 17 00:00:00 2001
From: Rahix <rahix@rahix.de>
Date: Fri, 22 Nov 2019 21:50:18 +0100
Subject: [PATCH] chore(libcard10): Fix all sign-compare warnings

Signed-off-by: Rahix <rahix@rahix.de>
---
 lib/card10/card10.c       | 2 +-
 lib/card10/portexpander.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/card10/card10.c b/lib/card10/card10.c
index 43361ef0..51ac0429 100644
--- a/lib/card10/card10.c
+++ b/lib/card10/card10.c
@@ -69,7 +69,7 @@ void card10_init(void)
 	)
 		;
 	/* If we don't have a valid time yet, set it to 2019-01-01 */
-	if (RTC_GetSecond() < 1546300800UL) {
+	if (RTC_GetSecond() < 1546300800L) {
 		while (RTC_Init(MXC_RTC, 1546300800UL, 0, NULL) == E_BUSY)
 			;
 	}
diff --git a/lib/card10/portexpander.c b/lib/card10/portexpander.c
index 8d4c3891..c1a025e2 100644
--- a/lib/card10/portexpander.c
+++ b/lib/card10/portexpander.c
@@ -100,7 +100,7 @@ int portexpander_init(void)
 
 	// Enable pull-ups for buttons
 	// Enable outputs for the transistors, the LED and the LCD reset
-	for (int i = 0; i < sizeof(pe_pin_config) / sizeof(pe_pin_config[0]);
+	for (size_t i = 0; i < sizeof(pe_pin_config) / sizeof(pe_pin_config[0]);
 	     i++) {
 		ret = portexpander_config(&pe_pin_config[i]);
 		MXC_ASSERT(ret == E_NO_ERROR);
-- 
GitLab