From 7e56a62e8bbde2449679b01ef3fc40be16f9424e Mon Sep 17 00:00:00 2001 From: Saleem Rashid Date: Mon, 14 Aug 2017 13:42:59 +0100 Subject: [PATCH] coins: Add _Static_assert for Features.coins max_count --- firmware/coins.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/firmware/coins.h b/firmware/coins.h index 7df4bccecc..a00709b63e 100644 --- a/firmware/coins.h +++ b/firmware/coins.h @@ -20,6 +20,7 @@ #ifndef __COINS_H__ #define __COINS_H__ +#include "messages.pb.h" #include "types.pb.h" #if DEBUG_LINK @@ -28,6 +29,8 @@ #define COINS_COUNT 8 #endif +_Static_assert(pb_arraysize(Features, coins) >= COINS_COUNT, "Features.coins max_count not large enough"); + extern const CoinType coins[COINS_COUNT]; const CoinType *coinByName(const char *name);