[riot-notifications] [RIOT-OS/RIOT] pkg/fatfs: Refactor path handling, minor fixes (#8615)

Joakim Nohlgård notifications at github.com
Tue Feb 27 15:54:08 CET 2018


I see this with `BOARD=mulle` and gcc 7.3.0:

```
"make" -C /home/jgn/work/src/riot/pkg/fatfs/fatfs_vfs
In file included from /usr/arm-none-eabi/include/stdio.h:800:0,
                 from /home/jgn/work/src/riot/core/include/debug.h:27,
                 from /home/jgn/work/src/riot/pkg/fatfs/fatfs_vfs/fatfs_vfs.c:34:
/home/jgn/work/src/riot/pkg/fatfs/fatfs_vfs/fatfs_vfs.c: In function ‘_umount’:
/home/jgn/work/src/riot/pkg/fatfs/fatfs_vfs/fatfs_vfs.c:73:46: error: ‘:/’ directive output may be truncated writing 2 bytes into a region of size between 1 and 3 [-Werror=format-truncation=]
     snprintf(volume_str, sizeof(volume_str), "%d:/", fs_desc->vol_idx);
                                              ^
/home/jgn/work/src/riot/pkg/fatfs/fatfs_vfs/fatfs_vfs.c:73:5: note: ‘__builtin_snprintf’ output between 4 and 6 bytes into a destination of size 4
     snprintf(volume_str, sizeof(volume_str), "%d:/", fs_desc->vol_idx);
     ^
/home/jgn/work/src/riot/pkg/fatfs/fatfs_vfs/fatfs_vfs.c: In function ‘_mount’:
/home/jgn/work/src/riot/pkg/fatfs/fatfs_vfs/fatfs_vfs.c:49:46: error: ‘:/’ directive output may be truncated writing 2 bytes into a region of size between 1 and 3 [-Werror=format-truncation=]
     snprintf(volume_str, sizeof(volume_str), "%d:/", fs_desc->vol_idx);
                                              ^
/home/jgn/work/src/riot/pkg/fatfs/fatfs_vfs/fatfs_vfs.c:49:5: note: ‘__builtin_snprintf’ output between 4 and 6 bytes into a destination of size 4
     snprintf(volume_str, sizeof(volume_str), "%d:/", fs_desc->vol_idx);
     ^
/home/jgn/work/src/riot/pkg/fatfs/fatfs_vfs/fatfs_vfs.c: In function ‘_fstat’:
/home/jgn/work/src/riot/pkg/fatfs/fatfs_vfs/fatfs_vfs.c:254:67: error: ‘__builtin_snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
     snprintf(fs_desc->abs_path_str_buff, FATFS_MAX_ABS_PATH_SIZE, "%d:/%s",
                                                                   ^
/home/jgn/work/src/riot/pkg/fatfs/fatfs_vfs/fatfs_vfs.c:254:5: note: ‘__builtin_snprintf’ output between 4 and 37 bytes into a destination of size 36
     snprintf(fs_desc->abs_path_str_buff, FATFS_MAX_ABS_PATH_SIZE, "%d:/%s",
     ^
cc1: all warnings being treated as errors
make[2]: *** [/home/jgn/work/src/riot/Makefile.base:81: /home/jgn/work/src/riot/tests/pkg_fatfs_vfs/bin/mulle/fatfs_vfs/fatfs_vfs.o] Error 1
```

```
Installed toolchain versions
----------------------------
          native gcc: gcc (Gentoo 7.3.0 p1.0) 7.3.0
          msp430-gcc: missing/error
             avr-gcc: avr-gcc (Gentoo 7.3.0 p1.0) 7.3.0
   arm-none-eabi-gcc: arm-none-eabi-gcc (Gentoo 7.3.0 p1.0) 7.3.0
    mips-mti-elf-gcc: mips-mti-elf-gcc (Codescape GNU Tools 2016.05-03 for MIPS MTI Bare Metal) 4.9.2
               clang: clang version 5.0.1 (tags/RELEASE_501/final)
arm-none-eabi-newlib: "2.5.0"
 mips-mti-elf-newlib: "2.1.0"
            avr-libc: "2.0.0" ("20150208")
            cppcheck: Cppcheck 1.81
          coccinelle: spatch version 1.0.6 compiled with OCaml version 4.05.0
                 git: git version 2.16.2
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/8615#issuecomment-368904081
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20180227/74412ed6/attachment.html>


More information about the notifications mailing list