From 418c88eeb06685a2f5037cde910a33bf3c3078dc Mon Sep 17 00:00:00 2001 From: Antonio Galea Date: Thu, 18 Feb 2021 11:10:09 +0100 Subject: [PATCH] sys/riotboot/flashwrite.c: add message to static assert static_assert as defined in c11 requires both an expression and a message. The message is only optional from c17 onwards. --- sys/riotboot/flashwrite.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/riotboot/flashwrite.c b/sys/riotboot/flashwrite.c index 25b4ec2b6d..1cffe80140 100644 --- a/sys/riotboot/flashwrite.c +++ b/sys/riotboot/flashwrite.c @@ -47,11 +47,13 @@ int riotboot_flashwrite_init_raw(riotboot_flashwrite_t *state, int target_slot, #ifdef FLASHPAGE_SIZE assert(offset <= FLASHPAGE_SIZE); /* the flashpage size must be a multiple of the riotboot flashpage buffer */ - static_assert(!(FLASHPAGE_SIZE % RIOTBOOT_FLASHPAGE_BUFFER_SIZE)); + static_assert(!(FLASHPAGE_SIZE % RIOTBOOT_FLASHPAGE_BUFFER_SIZE), + "Flashpage size must be a multiple of riotboot flashpage buffer."); #else /* The flashpage buffer must be a multiple of the write block size */ static_assert(!(RIOTBOOT_FLASHPAGE_BUFFER_SIZE % - FLASHPAGE_WRITE_BLOCK_SIZE)); + FLASHPAGE_WRITE_BLOCK_SIZE), + "Flashpage buffer must be a multiple of write block size."); #endif