mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
sys/cbor: change array initializer from const variable to #define
OS X clang complains "folded to constant array as an extension" [-Wgnu-folding-constant]
This commit is contained in:
parent
be8f63769c
commit
e93fd66dbb
@ -81,6 +81,9 @@
|
||||
/* Extra defines not related to the protocol itself */
|
||||
#define CBOR_STREAM_PRINT_BUFFERSIZE 1024 /* bytes */
|
||||
|
||||
/* Array size */
|
||||
#define MAX_TIMESTRING_LENGTH (21)
|
||||
|
||||
#ifndef INFINITY
|
||||
#define INFINITY (1.0/0.0)
|
||||
#endif
|
||||
@ -694,7 +697,6 @@ size_t cbor_deserialize_date_time(const cbor_stream_t *stream, size_t offset, st
|
||||
|
||||
size_t cbor_serialize_date_time(cbor_stream_t *stream, struct tm *val)
|
||||
{
|
||||
static const int MAX_TIMESTRING_LENGTH = 21;
|
||||
CBOR_ENSURE_SIZE(stream, MAX_TIMESTRING_LENGTH + 1); /* + 1 tag byte */
|
||||
|
||||
char time_str[MAX_TIMESTRING_LENGTH];
|
||||
|
Loading…
Reference in New Issue
Block a user