Skip to content

Commit 84cf24f

Browse files
author
Janne Kiiskila
committed
IAR / FATFS - Pe029 error
IAR compilation fails at `_fs = { 0 };` due to ``` [Error] FATFileSystem.cpp@285,0: [Pe029]: expected an expression ``` Changing that to memset() fixes the issue, IAR is more sensitive in C/C++ being mixed together than other compilers.
1 parent 8213a5b commit 84cf24f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

features/storage/filesystem/fat/FATFileSystem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ extern "C" DRESULT disk_ioctl(BYTE pdrv, BYTE cmd, void *buff)
282282
FATFileSystem::FATFileSystem(const char *name, BlockDevice *bd)
283283
: FileSystem(name), _id(-1)
284284
{
285-
_fs = { 0 };
285+
memset(&_fs, 0, sizeof(_fs));
286286
if (bd) {
287287
mount(bd);
288288
}

0 commit comments

Comments
 (0)