X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=common%2Fdebug.c;h=18613fc28bdd532fafb3d9b1b514a9b2bc6414b2;hb=af556d39d2f5a1ee30c34ee65ecd5d1b7a519bdc;hp=c4fa3a05b4a7284f41b701e94563523e51cc56e4;hpb=e3f4f7d8c4dd821ff47caa8a22318c674f43a4e9;p=max%2Ftmk_keyboard.git diff --git a/common/debug.c b/common/debug.c index c4fa3a05..18613fc2 100644 --- a/common/debug.c +++ b/common/debug.c @@ -1,12 +1,24 @@ #include #include "debug.h" +#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) -//debug_config_t debug_config = { .enable = false, .matrix = false }; debug_config_t debug_config = { +/* GCC Bug 10676 - Using unnamed fields in initializers + * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676 */ +#if GCC_VERSION >= 40600 .enable = false, .matrix = false, .keyboard = false, .mouse = false, + .reserved = 0 +#else + { + false, // .enable + false, // .matrix + false, // .keyboard + false, // .mouse + 0 // .reserved + } +#endif }; -