From 5d83bbca60ea3f4071b9245daf8a41296072f918 Mon Sep 17 00:00:00 2001 From: Yoctopuce Date: Tue, 30 Jan 2024 09:46:17 +0100 Subject: [PATCH] shared/timeutils: Remove useless void-return. The C99 standard states: 6.8.6.4 The return statement Constraints A return statement with an expression shall not appear in a function whose return type is void. A return statement without an expression shall only appear in a function whose return type is void. And when `-pedantic` is enabled the compiler gives an error. Signed-off-by: Yoctopuce --- shared/timeutils/timeutils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/timeutils/timeutils.h b/shared/timeutils/timeutils.h index 9f4b500caa..69cbd95df5 100644 --- a/shared/timeutils/timeutils.h +++ b/shared/timeutils/timeutils.h @@ -60,7 +60,7 @@ mp_uint_t timeutils_mktime_2000(mp_uint_t year, mp_int_t month, mp_int_t mday, static inline void timeutils_seconds_since_epoch_to_struct_time(uint64_t t, timeutils_struct_time_t *tm) { // TODO this will give incorrect results for dates before 2000/1/1 - return timeutils_seconds_since_2000_to_struct_time(t - TIMEUTILS_SECONDS_1970_TO_2000, tm); + timeutils_seconds_since_2000_to_struct_time(t - TIMEUTILS_SECONDS_1970_TO_2000, tm); } static inline uint64_t timeutils_mktime(mp_uint_t year, mp_int_t month, mp_int_t mday, mp_int_t hours, mp_int_t minutes, mp_int_t seconds) {