Revision 75d6970a

View differences:

kernel/ChibiOS
1
Subproject commit 1aec7371a82e70d83d4aabd05445f5a9ac619b37
1
Subproject commit 6494e27fd86fc8b674547e0740dbba1a3b1d5f35
kernel/kernelsetup.sh
454 454
    for patch in $patches; do
455 455
      cp $patch .
456 456
      patch=$(basename $patch)
457
      git apply --whitespace=nowarn < $patch 2>&1 | tee -a $LOG_FILE
457
      git apply --whitespace=nowarn --ignore-space-change --ignore-whitespace < $patch 2>&1 | tee -a $LOG_FILE
458 458
      rm $patch
459 459
#      # These lines are disabled for safety reasons:
460 460
#      #   Filed commits are detected as valid changes by the super-project.
kernel/patches/RTCv1-fixed-illegal-type-casts.patch
1
From 6a763db09751ded7e11e531825c1c12d9fbecca9 Mon Sep 17 00:00:00 2001
2
From: =?UTF-8?q?Thomas=20Sch=C3=B6pping?= <tschoepp@cit-ec.uni-bielefeld.de>
3
Date: Fri, 13 Jul 2018 16:21:27 +0200
4
Subject: [PATCH] RTCv1: Fixed illegal type casts (from pointer to arithmetic type to pointer to real type).
5

  
6
---
7
 os/hal/ports/STM32/LLD/RTCv1/hal_rtc_lld.c | 5 +++--
8
 1 file changed, 3 insertions(+), 2 deletions(-)
9

  
10
diff --git a/os/hal/ports/STM32/LLD/RTCv1/hal_rtc_lld.c b/os/hal/ports/STM32/LLD/RTCv1/hal_rtc_lld.c
11
index df4b7e7..fedce93 100644
12
--- a/os/hal/ports/STM32/LLD/RTCv1/hal_rtc_lld.c
13
+++ b/os/hal/ports/STM32/LLD/RTCv1/hal_rtc_lld.c
14
@@ -130,14 +130,15 @@ static void rtc_decode(uint32_t tv_sec,
15
                        RTCDateTime *timespec) {
16
   struct tm tim;
17
   struct tm *t;
18
+  const time_t time = tv_sec;
19
 
20
   /* If the conversion is successful the function returns a pointer
21
      to the object the result was written into.*/
22
 #if defined(__GNUC__) || defined(__CC_ARM)
23
-  t = localtime_r((time_t *)&(tv_sec), &tim);
24
+  t = localtime_r(&time, &tim);
25
   osalDbgAssert(t != NULL, "conversion failed");
26
 #else
27
-  t = localtime(&tv_sec);
28
+  t = localtime(&time);
29
   memcpy(&tim, t, sizeof(struct tm));
30
 #endif
31
 
32
-- 
33
2.7.4
34

  

Also available in: Unified diff