1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

3 Commits

Author SHA1 Message Date
Joakim Nohlgård
b55975fc0a unittests: Fix printf float test BUFSIZE
Fixes the following error from GCC 7.2.0 with a recent newlib

In file included from /usr/arm-none-eabi/include/stdio.h:800:0,
                 from /home/jgn/work/src/riot/tests/unittests/tests-printf_float/tests-printf_float.c:21:
/home/jgn/work/src/riot/tests/unittests/tests-printf_float/tests-printf_float.c: In function ‘sfprintf_float’:
/home/jgn/work/src/riot/tests/unittests/tests-printf_float/tests-printf_float.c:39:28: error: ‘%f’ directive output truncated writing 11 bytes into a region of size 10 [-Werror=format-truncation=]
     snprintf(str, BUFSIZE, "%f", in0);
                            ^
/home/jgn/work/src/riot/tests/unittests/tests-printf_float/tests-printf_float.c:39:5: note: ‘__builtin_snprintf’ output 12 bytes into a destination of size 10
     snprintf(str, BUFSIZE, "%f", in0);
     ^
cc1: all warnings being treated as errors
2017-12-12 12:16:43 +01:00
Oleg Hahm
7ee7801c10 *: remove trailing underscores from header guards 2017-01-19 18:30:53 +01:00
Hauke Petersen
08a2aed46d unittests: added test for printf with floats 2016-07-18 23:22:28 +02:00