Skip to content

Commit 5d83bbc

Browse files
yoctopucedpgeorge
authored andcommitted
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 <dev@yoctopuce.com>
1 parent 587b6f2 commit 5d83bbc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

shared/timeutils/timeutils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ mp_uint_t timeutils_mktime_2000(mp_uint_t year, mp_int_t month, mp_int_t mday,
6060

6161
static inline void timeutils_seconds_since_epoch_to_struct_time(uint64_t t, timeutils_struct_time_t *tm) {
6262
// TODO this will give incorrect results for dates before 2000/1/1
63-
return timeutils_seconds_since_2000_to_struct_time(t - TIMEUTILS_SECONDS_1970_TO_2000, tm);
63+
timeutils_seconds_since_2000_to_struct_time(t - TIMEUTILS_SECONDS_1970_TO_2000, tm);
6464
}
6565

6666
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) {

0 commit comments

Comments
 (0)