From a8694571cf7fa6400eeca79e5f424933ea000141 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Thu, 6 Jan 2022 12:32:16 +0100 Subject: [PATCH] pkg/fatfs: fix build on AVR --- pkg/fatfs/fatfs_diskio/mtd/mtd_diskio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/fatfs/fatfs_diskio/mtd/mtd_diskio.c b/pkg/fatfs/fatfs_diskio/mtd/mtd_diskio.c index 6fd49c8014..a997f3f6ae 100644 --- a/pkg/fatfs/fatfs_diskio/mtd/mtd_diskio.c +++ b/pkg/fatfs/fatfs_diskio/mtd/mtd_diskio.c @@ -215,9 +215,9 @@ DWORD get_fattime(void) uint8_t minute = time.tm_min; /* bit 10:5 minute (0..59) */ uint8_t second = (time.tm_sec / 2); /* bit 4:0 second/2 (0..29) */ - return year << FATFS_DISKIO_FATTIME_YEAR_OFFS | - month << FATFS_DISKIO_FATTIME_MON_OFFS | - day_of_month << FATFS_DISKIO_FATTIME_DAY_OFFS | + return (DWORD)year << FATFS_DISKIO_FATTIME_YEAR_OFFS | + (DWORD)month << FATFS_DISKIO_FATTIME_MON_OFFS | + (DWORD)day_of_month << FATFS_DISKIO_FATTIME_DAY_OFFS | hour << FATFS_DISKIO_FATTIME_HH_OFFS | minute << FATFS_DISKIO_FATTIME_MM_OFFS | second;