Fix gcc10 compiler warnings

- fix attribute format for MINGW in tinycbor/cbor.h
- add pragma to prevent "unaligned pointer" warning in cmddata.c. We know what we are doing there.
- whitespace fixes
This commit is contained in:
pwpiwi 2021-01-29 08:26:33 +01:00
commit 8ac5d5cba1
2 changed files with 59 additions and 52 deletions

View file

@ -581,7 +581,11 @@ enum CborPrettyFlags {
typedef CborError (*CborStreamFunction)(void *token, const char *fmt, ...)
#ifdef __GNUC__
__attribute__((__format__(printf, 2, 3)))
#if defined(__MINGW32__) || defined(__MINGW64__)
__attribute__((__format__(__MINGW_PRINTF_FORMAT, 2, 3)))
#else
__attribute__((__format__(printf, 2, 3)))
#endif
#endif
;