From 224fc8a20fc78927ed90326ca6c07370d33d00d5 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 9 Apr 2017 20:04:12 +0300 Subject: [PATCH 01/22] Add makefile option to break on errors --- Makefile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 9d9c9629d..297de0caf 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,8 @@ override SILENT := false ON_ERROR := error_occurred=1 +BREAK_ON_ERRORS = no + STARTING_MAKEFILE := $(firstword $(MAKEFILE_LIST)) ROOT_MAKEFILE := $(lastword $(MAKEFILE_LIST)) ROOT_DIR := $(dir $(ROOT_MAKEFILE)) @@ -462,20 +464,25 @@ endef include $(ROOT_DIR)/message.mk +ifeq ($(strip $(BREAK_ON_ERRORS)), yes) +HANDLE_ERROR = exit 1 +else +HANDLE_ERROR = echo $$error_occurred > $(ERROR_FILE) +endif + # The empty line is important here, as it will force a new shell to be created for each command # Otherwise the command line will become too long with a lot of keyboards and keymaps define RUN_COMMAND +error_occurred=0;\ $(COMMAND_$(SILENT_MODE)_$(COMMAND))\ -if [ $$error_occurred -gt 0 ]; then echo $$error_occurred > $(ERROR_FILE); fi; +if [ $$error_occurred -gt 0 ]; then $(HANDLE_ERROR); fi; endef define RUN_TEST +error_occurred=0;\ $($(TEST)_COMMAND)\ -if [ $$error_occurred -gt 0 ]; then echo $$error_occurred > $(ERROR_FILE); fi; - +if [ $$error_occurred -gt 0 ]; then $(HANDLE_ERROR); fi; endef # Allow specifying just the subproject, in the keyboard directory, which will compile all keymaps From f39e9928eb7f0c77c366721ff489bd5276dad7e2 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 9 Apr 2017 20:04:41 +0300 Subject: [PATCH 02/22] Enable warnings as errors --- tmk_core/rules.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index e4c8aecb2..25993354f 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk @@ -92,6 +92,7 @@ endif endif CFLAGS += -Wall CFLAGS += -Wstrict-prototypes +CFLAGS += -Werror #CFLAGS += -mshort-calls #CFLAGS += -fno-unit-at-a-time #CFLAGS += -Wundef @@ -115,6 +116,7 @@ CPPFLAGS += -O$(OPT) CPPFLAGS += -w CPPFLAGS += -Wall CPPFLAGS += -Wundef +CPPFLAGS += -Werror #CPPFLAGS += -mshort-calls #CPPFLAGS += -fno-unit-at-a-time #CPPFLAGS += -Wstrict-prototypes From a4ef86034c328ed7db9b9f0e2e49c5019d5aabc8 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 9 Apr 2017 20:08:46 +0300 Subject: [PATCH 03/22] Fix undefined eeprom warnings in unicode processing --- quantum/process_keycode/process_unicode.c | 1 + quantum/process_keycode/process_unicode_common.c | 1 + 2 files changed, 2 insertions(+) diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index 678a15234..fd008eca1 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c @@ -15,6 +15,7 @@ */ #include "process_unicode.h" #include "action_util.h" +#include "eeprom.h" static uint8_t first_flag = 0; diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c index 1dbdec3e7..84b5d673d 100644 --- a/quantum/process_keycode/process_unicode_common.c +++ b/quantum/process_keycode/process_unicode_common.c @@ -15,6 +15,7 @@ */ #include "process_unicode_common.h" +#include "eeprom.h" static uint8_t input_mode; uint8_t mods; From 653580477663f527f322650f6d39824cdf6cddc0 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 9 Apr 2017 21:00:42 +0300 Subject: [PATCH 04/22] Disable array bounds warning in keymap_function_id_to_action --- quantum/keymap_common.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 6cf4f031f..9dafc8b51 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -179,5 +179,12 @@ uint16_t keymap_key_to_keycode(uint8_t layer, keypos_t key) __attribute__ ((weak)) uint16_t keymap_function_id_to_action( uint16_t function_id ) { + // The compiler sees the empty (weak) fn_actions and generates a warning + // This function should not be called in that case, so the warning is too strict + // If this function is called however, the keymap should have overridden fn_actions, and then the compile + // is comparing against the wrong array + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Warray-bounds" return pgm_read_word(&fn_actions[function_id]); + #pragma GCC diagnostic pop } From db6d7207b5f9026f8d265b150cf45778545095ea Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 9 Apr 2017 21:02:45 +0300 Subject: [PATCH 05/22] Fix overflow warnings in dvorak_programmer --- keyboards/ergodox/keymaps/dvorak_programmer/keymap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index ae4fd444d..d299d02c3 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -311,12 +311,12 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) break; case SWITCH_NDS: if (record->event.pressed) { - return MACRO( D(LSFT), T(F11), U(LSFT), W(500), D(LALT), T(TAB), U(LALT), END); + return MACRO( D(LSFT), T(F11), U(LSFT), W(255), D(LALT), T(TAB), U(LALT), END); } break; case OPEN_CLOSE_PAREN: if (record->event.pressed) { - return MACRO( D(LSFT), T(LPRN), T(RPRN), U(LSFT), T(LEFT), END); + return MACRO( D(LSFT), T(9), T(0), U(LSFT), T(LEFT), END); } break; case OPEN_CLOSE_BRACKET: @@ -326,7 +326,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) break; case OPEN_CLOSE_CURLY: if (record->event.pressed) { - return MACRO( D(LSFT), T(LCBR), T(RCBR), U(LSFT), T(LEFT), END); + return MACRO( D(LSFT), T(LBRC), T(RBRC), U(LSFT), T(LEFT), END); } break; case OPEN_CLOSE_SINGLE_QUOTE: From 12159e782cc6233b82760bf21631be730d42087b Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 9 Apr 2017 21:05:31 +0300 Subject: [PATCH 06/22] Fix overflow warning in ordinary keymap --- keyboards/ergodox/keymaps/ordinary/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/ergodox/keymaps/ordinary/keymap.c b/keyboards/ergodox/keymaps/ordinary/keymap.c index 1dfdf7e62..ac84df570 100644 --- a/keyboards/ergodox/keymaps/ordinary/keymap.c +++ b/keyboards/ergodox/keymaps/ordinary/keymap.c @@ -392,7 +392,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case NotEq: if (record->event.pressed) { - return MACRO( I(10), D(LSFT), T(EXLM), U(LSFT), T(EQL), END ); // != + return MACRO( I(10), D(LSFT), T(1), U(LSFT), T(EQL), END ); // != } break; From f7b59427faeaef210227017c8a173f1324fbc795 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 9 Apr 2017 21:17:32 +0300 Subject: [PATCH 07/22] Fix name collision between ChibiOS and keymap_german --- quantum/keymap_extras/keymap_german_ch.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/quantum/keymap_extras/keymap_german_ch.h b/quantum/keymap_extras/keymap_german_ch.h index 8332e00af..67350d660 100644 --- a/quantum/keymap_extras/keymap_german_ch.h +++ b/quantum/keymap_extras/keymap_german_ch.h @@ -33,6 +33,10 @@ #define CH_E KC_E #define CH_F KC_F #define CH_G KC_G +#ifdef CH_H +// The ChibiOS ch.h file defines this... +#undef CH_H +#endif #define CH_H KC_H #define CH_I KC_I #define CH_J KC_J From 2d1528c69f13258de9193d9099d196a60f3892d4 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 9 Apr 2017 22:02:37 +0300 Subject: [PATCH 08/22] Fix keymap yoruian on Infinity --- keyboards/ergodox/keymaps/yoruian/keymap.c | 4 +-- keyboards/ergodox/keymaps/yoruian/yoruian.h | 31 +++++++-------------- 2 files changed, 12 insertions(+), 23 deletions(-) diff --git a/keyboards/ergodox/keymaps/yoruian/keymap.c b/keyboards/ergodox/keymaps/yoruian/keymap.c index d3635ddf3..41dfda3c6 100644 --- a/keyboards/ergodox/keymaps/yoruian/keymap.c +++ b/keyboards/ergodox/keymaps/yoruian/keymap.c @@ -17,7 +17,7 @@ #include "yoruian.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = KEYMAP\ +[0] = KEYMAP_YORUIAN\ (9, 7, 5, 3, 1, GRV, MINS, EQL, LBRC, 0, 2, 4, 6, 8, ES, RBRC, Y, O, R, BSLS, P3, P3, J, V, D, F, W, Q, LC, U, I, A, N, SCLN, M, H, T, S, C, RC, @@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { BSPC, RALT, P2, TAB, NO, NO, E, LSFT, NO, NO, ENT, SPC), -[1] = KEYMAP\ +[1] = KEYMAP_YORUIAN\ (TR, TR, TR, TR, TR, TR, TR, TR, TR, F5, F6, F7, F8, F9, TR, TR, TR, TR, TR, TR, TR, TR, TR, F1, F2, F3, F4, FT, TR, TR, TR, TR, TR, TR, PAUS, LEFT, DOWN, UP, RGHT, FE, diff --git a/keyboards/ergodox/keymaps/yoruian/yoruian.h b/keyboards/ergodox/keymaps/yoruian/yoruian.h index 1adcb7fd3..b3b13073c 100644 --- a/keyboards/ergodox/keymaps/yoruian/yoruian.h +++ b/keyboards/ergodox/keymaps/yoruian/yoruian.h @@ -18,9 +18,7 @@ #include "debug.h" #include "action_layer.h" -#undef KEYMAP -#define KEYMAP\ -( \ +#define KEYMAP_YORUIAN( \ /* Spacial positions. */ \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ @@ -30,24 +28,15 @@ k55, k56, k57, k58, \ k54, k59, \ k53, k52, k51, k5C, k5B, k5A) \ - \ - /* Matrix positions. */ \ - { \ - { KC_##k00, KC_##k10, KC_##k20, KC_##k30, KC_##k40, KC_NO }, \ - { KC_##k01, KC_##k11, KC_##k21, KC_##k31, KC_##k41, KC_##k51 }, \ - { KC_##k02, KC_##k12, KC_##k22, KC_##k32, KC_##k42, KC_##k52 }, \ - { KC_##k03, KC_##k13, KC_##k23, KC_##k33, KC_##k43, KC_##k53 }, \ - { KC_##k04, KC_##k14, KC_##k24, KC_##k34, KC_##k44, KC_##k54 }, \ - { KC_##k05, KC_##k15, KC_##k25, KC_##k35, KC_NO, KC_##k55 }, \ - { KC_##k06, KC_##k16, KC_NO, KC_##k36, KC_NO, KC_##k56 }, \ - { KC_##k07, KC_##k17, KC_NO, KC_##k37, KC_NO, KC_##k57 }, \ - { KC_##k08, KC_##k18, KC_##k28, KC_##k38, KC_NO, KC_##k58 }, \ - { KC_##k09, KC_##k19, KC_##k29, KC_##k39, KC_##k49, KC_##k59 }, \ - { KC_##k0A, KC_##k1A, KC_##k2A, KC_##k3A, KC_##k4A, KC_##k5A }, \ - { KC_##k0B, KC_##k1B, KC_##k2B, KC_##k3B, KC_##k4B, KC_##k5B }, \ - { KC_##k0C, KC_##k1C, KC_##k2C, KC_##k3C, KC_##k4C, KC_##k5C }, \ - { KC_##k0D, KC_##k1D, KC_##k2D, KC_##k3D, KC_##k4D, KC_NO } \ - } + KEYMAP( \ + KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0A, KC_##k0B, KC_##k0C, KC_##k0D, \ + KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1A, KC_##k1B, KC_##k1C, KC_##k1D, \ + KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k28, KC_##k29, KC_##k2A, KC_##k2B, KC_##k2C, KC_##k2D, \ + KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3A, KC_##k3B, KC_##k3C, KC_##k3D, \ + KC_##k40, KC_##k41, KC_##k42, KC_##k43, KC_##k44, KC_##k49, KC_##k4A, KC_##k4B, KC_##k4C, KC_##k4D, \ + KC_##k55, KC_##k56, KC_##k57, KC_##k58, \ + KC_##k54, KC_##k59, \ + KC_##k53, KC_##k52, KC_##k51, KC_##k5C, KC_##k5B, KC_##k5A) #define KC_ES KC_ESC #define KC_LC KC_LCTL From e950d4e12fb92550b34ab7c2b48d45a11bf88026 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 9 Apr 2017 22:19:52 +0300 Subject: [PATCH 09/22] Fix frosty_flake warning when print is disabled --- keyboards/frosty_flake/matrix.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/keyboards/frosty_flake/matrix.c b/keyboards/frosty_flake/matrix.c index 05dffdb64..cde7f63b9 100644 --- a/keyboards/frosty_flake/matrix.c +++ b/keyboards/frosty_flake/matrix.c @@ -115,6 +115,7 @@ inline matrix_row_t matrix_get_row(uint8_t row) { } void matrix_print(void) { +#ifndef NO_PRINT print("\nr\\c ABCDEFGHIJKLMNOPQR\n"); for (uint8_t row = 0; row < MATRIX_ROWS; row++) { matrix_row_t matrix_row = matrix_get_row(row); @@ -125,6 +126,7 @@ void matrix_print(void) { } print("\n"); } +#endif } uint8_t matrix_key_count(void) { @@ -132,4 +134,4 @@ uint8_t matrix_key_count(void) { for (uint8_t row = 0; row < MATRIX_ROWS; row++) count += bitpop32(matrix[row]); return count; -} \ No newline at end of file +} From 738b8d2b9c458839d23f584843b251b1c8f29880 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 9 Apr 2017 22:48:35 +0300 Subject: [PATCH 10/22] Add SKIP_VERSION option to speed up compilation --- Makefile | 8 ++++++++ .../MS_sculpt_mobile.c} | 0 .../MS_sculpt_mobile.h} | 0 .../{MS-sculpt-mobile => MS_sculpt_mobile}/Makefile | 0 .../{MS-sculpt-mobile => MS_sculpt_mobile}/babblePaste.c | 0 .../{MS-sculpt-mobile => MS_sculpt_mobile}/babblePaste.h | 0 .../babblePaste.txt | 0 .../{MS-sculpt-mobile => MS_sculpt_mobile}/config.h | 0 .../keymaps/default/Makefile | 0 .../keymaps/default/config.h | 0 .../keymaps/default/keymap.c | 0 .../keymaps/default/readme.md | 0 .../keymaps/milestogo/Makefile | 0 .../keymaps/milestogo/config.h | 0 .../keymaps/milestogo/keymap.c | 0 .../keymaps/milestogo/readme.md | 0 .../{MS-sculpt-mobile => MS_sculpt_mobile}/readme.md | 0 .../{MS-sculpt-mobile => MS_sculpt_mobile}/rules.mk | 0 18 files changed, 8 insertions(+) rename keyboards/handwired/{MS-sculpt-mobile/MS-sculpt-mobile.c => MS_sculpt_mobile/MS_sculpt_mobile.c} (100%) rename keyboards/handwired/{MS-sculpt-mobile/MS-sculpt-mobile.h => MS_sculpt_mobile/MS_sculpt_mobile.h} (100%) rename keyboards/handwired/{MS-sculpt-mobile => MS_sculpt_mobile}/Makefile (100%) rename keyboards/handwired/{MS-sculpt-mobile => MS_sculpt_mobile}/babblePaste.c (100%) rename keyboards/handwired/{MS-sculpt-mobile => MS_sculpt_mobile}/babblePaste.h (100%) rename keyboards/handwired/{MS-sculpt-mobile => MS_sculpt_mobile}/babblePaste.txt (100%) rename keyboards/handwired/{MS-sculpt-mobile => MS_sculpt_mobile}/config.h (100%) rename keyboards/handwired/{MS-sculpt-mobile => MS_sculpt_mobile}/keymaps/default/Makefile (100%) rename keyboards/handwired/{MS-sculpt-mobile => MS_sculpt_mobile}/keymaps/default/config.h (100%) rename keyboards/handwired/{MS-sculpt-mobile => MS_sculpt_mobile}/keymaps/default/keymap.c (100%) rename keyboards/handwired/{MS-sculpt-mobile => MS_sculpt_mobile}/keymaps/default/readme.md (100%) rename keyboards/handwired/{MS-sculpt-mobile => MS_sculpt_mobile}/keymaps/milestogo/Makefile (100%) rename keyboards/handwired/{MS-sculpt-mobile => MS_sculpt_mobile}/keymaps/milestogo/config.h (100%) rename keyboards/handwired/{MS-sculpt-mobile => MS_sculpt_mobile}/keymaps/milestogo/keymap.c (100%) rename keyboards/handwired/{MS-sculpt-mobile => MS_sculpt_mobile}/keymaps/milestogo/readme.md (100%) rename keyboards/handwired/{MS-sculpt-mobile => MS_sculpt_mobile}/readme.md (100%) rename keyboards/handwired/{MS-sculpt-mobile => MS_sculpt_mobile}/rules.mk (100%) diff --git a/Makefile b/Makefile index 297de0caf..6a93692bf 100644 --- a/Makefile +++ b/Makefile @@ -534,14 +534,22 @@ test: test-all .PHONY: test-clean test-clean: test-all-clean +ifdef SKIP_VERSION +SKIP_GIT := yes +endif + # Generate the version.h file ifndef SKIP_GIT GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S") else GIT_VERSION := NA endif +ifndef SKIP_VERSION BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S") $(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(ROOT_DIR)/quantum/version.h) $(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h) +else +BUILD_DATE := NA +endif include $(ROOT_DIR)/testlist.mk diff --git a/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.c b/keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.c similarity index 100% rename from keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.c rename to keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.c diff --git a/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.h b/keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.h similarity index 100% rename from keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.h rename to keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.h diff --git a/keyboards/handwired/MS-sculpt-mobile/Makefile b/keyboards/handwired/MS_sculpt_mobile/Makefile similarity index 100% rename from keyboards/handwired/MS-sculpt-mobile/Makefile rename to keyboards/handwired/MS_sculpt_mobile/Makefile diff --git a/keyboards/handwired/MS-sculpt-mobile/babblePaste.c b/keyboards/handwired/MS_sculpt_mobile/babblePaste.c similarity index 100% rename from keyboards/handwired/MS-sculpt-mobile/babblePaste.c rename to keyboards/handwired/MS_sculpt_mobile/babblePaste.c diff --git a/keyboards/handwired/MS-sculpt-mobile/babblePaste.h b/keyboards/handwired/MS_sculpt_mobile/babblePaste.h similarity index 100% rename from keyboards/handwired/MS-sculpt-mobile/babblePaste.h rename to keyboards/handwired/MS_sculpt_mobile/babblePaste.h diff --git a/keyboards/handwired/MS-sculpt-mobile/babblePaste.txt b/keyboards/handwired/MS_sculpt_mobile/babblePaste.txt similarity index 100% rename from keyboards/handwired/MS-sculpt-mobile/babblePaste.txt rename to keyboards/handwired/MS_sculpt_mobile/babblePaste.txt diff --git a/keyboards/handwired/MS-sculpt-mobile/config.h b/keyboards/handwired/MS_sculpt_mobile/config.h similarity index 100% rename from keyboards/handwired/MS-sculpt-mobile/config.h rename to keyboards/handwired/MS_sculpt_mobile/config.h diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/Makefile b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/Makefile similarity index 100% rename from keyboards/handwired/MS-sculpt-mobile/keymaps/default/Makefile rename to keyboards/handwired/MS_sculpt_mobile/keymaps/default/Makefile diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/config.h b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/config.h similarity index 100% rename from keyboards/handwired/MS-sculpt-mobile/keymaps/default/config.h rename to keyboards/handwired/MS_sculpt_mobile/keymaps/default/config.h diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/keymap.c b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/keymap.c similarity index 100% rename from keyboards/handwired/MS-sculpt-mobile/keymaps/default/keymap.c rename to keyboards/handwired/MS_sculpt_mobile/keymaps/default/keymap.c diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/readme.md b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/readme.md similarity index 100% rename from keyboards/handwired/MS-sculpt-mobile/keymaps/default/readme.md rename to keyboards/handwired/MS_sculpt_mobile/keymaps/default/readme.md diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/Makefile b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/Makefile similarity index 100% rename from keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/Makefile rename to keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/Makefile diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/config.h similarity index 100% rename from keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h rename to keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/config.h diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/keymap.c similarity index 100% rename from keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c rename to keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/keymap.c diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/readme.md b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/readme.md similarity index 100% rename from keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/readme.md rename to keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/readme.md diff --git a/keyboards/handwired/MS-sculpt-mobile/readme.md b/keyboards/handwired/MS_sculpt_mobile/readme.md similarity index 100% rename from keyboards/handwired/MS-sculpt-mobile/readme.md rename to keyboards/handwired/MS_sculpt_mobile/readme.md diff --git a/keyboards/handwired/MS-sculpt-mobile/rules.mk b/keyboards/handwired/MS_sculpt_mobile/rules.mk similarity index 100% rename from keyboards/handwired/MS-sculpt-mobile/rules.mk rename to keyboards/handwired/MS_sculpt_mobile/rules.mk From bbe8876c8df3d37c7fd2b85bd2ef9a1a60ad5fe1 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 9 Apr 2017 22:49:07 +0300 Subject: [PATCH 11/22] Rename MS-sculpt-mobile to MS_scuplpt_mobile Subprojects with "-" have problems, since the build system creates a define containing the subproject name, and "-" is illegal in macro names. --- keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.c | 2 +- keyboards/handwired/MS_sculpt_mobile/babblePaste.c | 7 ++++--- keyboards/handwired/MS_sculpt_mobile/babblePaste.h | 2 +- .../handwired/MS_sculpt_mobile/keymaps/default/config.h | 2 +- .../handwired/MS_sculpt_mobile/keymaps/default/keymap.c | 2 +- .../handwired/MS_sculpt_mobile/keymaps/milestogo/config.h | 2 +- .../handwired/MS_sculpt_mobile/keymaps/milestogo/keymap.c | 4 ++-- 7 files changed, 11 insertions(+), 10 deletions(-) diff --git a/keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.c b/keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.c index 4c735a6c2..64982fb62 100644 --- a/keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.c +++ b/keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.c @@ -1 +1 @@ -#include "MS-sculpt-mobile.h" +#include "MS_sculpt_mobile.h" diff --git a/keyboards/handwired/MS_sculpt_mobile/babblePaste.c b/keyboards/handwired/MS_sculpt_mobile/babblePaste.c index 3a9b86997..22394cc7d 100644 --- a/keyboards/handwired/MS_sculpt_mobile/babblePaste.c +++ b/keyboards/handwired/MS_sculpt_mobile/babblePaste.c @@ -7,7 +7,8 @@ Huge thanks to https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts and https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/jeebak/keymap.c */ -#include "babblePaste.h" +#include "../MS_sculpt_mobile/babblePaste.h" + #include "action_macro.h" #ifdef USE_BABLPASTE @@ -27,7 +28,7 @@ macro_t* switch_babble_mode( uint8_t id) { // And else statements have problems, see https://gcc.gnu.org/onlinedocs/gcc-3.0.1/cpp_3.html#SEC15 #define BABLM(ent, macro...) \ if ( ent == shortcut ) \ - { action_macro_play( MACRO(macro)); return MACRO_NONE; } + { action_macro_play( MACRO(macro)); return MACRO_NONE; } /* this function runs the appropriate babblepaste macro, given @@ -456,4 +457,4 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) { } -#endif \ No newline at end of file +#endif diff --git a/keyboards/handwired/MS_sculpt_mobile/babblePaste.h b/keyboards/handwired/MS_sculpt_mobile/babblePaste.h index 3067c854d..cedd7d92b 100644 --- a/keyboards/handwired/MS_sculpt_mobile/babblePaste.h +++ b/keyboards/handwired/MS_sculpt_mobile/babblePaste.h @@ -9,9 +9,9 @@ and jeebak & algernon's keymap */ #ifndef _babblePaste_h_included__ #define _babblePaste_h_included__ +#include "../MS_sculpt_mobile/config.h" #include "action_layer.h" #include "quantum_keycodes.h" -#include "config.h" #ifdef USE_BABLPASTE diff --git a/keyboards/handwired/MS_sculpt_mobile/keymaps/default/config.h b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/config.h index 8893d122e..4f3a425b7 100644 --- a/keyboards/handwired/MS_sculpt_mobile/keymaps/default/config.h +++ b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/config.h @@ -1,7 +1,7 @@ #ifndef CONFIG_USER_H #define CONFIG_USER_H -#include "../../config.h" +#include "../../../MS_sculpt_mobile/config.h" // place overrides here diff --git a/keyboards/handwired/MS_sculpt_mobile/keymaps/default/keymap.c b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/keymap.c index ab09dcdd1..a8802c99a 100644 --- a/keyboards/handwired/MS_sculpt_mobile/keymaps/default/keymap.c +++ b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "MS-sculpt-mobile.h" +#include "../../MS_sculpt_mobile.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* diff --git a/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/config.h b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/config.h index 8cf4202cd..5c04f647c 100644 --- a/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/config.h +++ b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/config.h @@ -1,7 +1,7 @@ #ifndef CONFIG_USER_H #define CONFIG_USER_H -#include "../../config.h" +#include "../../../MS_sculpt_mobile/config.h" #define USE_BABLPASTE diff --git a/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/keymap.c b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/keymap.c index 395a9fb47..c9a8ccdb6 100644 --- a/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/keymap.c +++ b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/keymap.c @@ -1,7 +1,7 @@ -#include "MS-sculpt-mobile.h" +#include "../../../MS_sculpt_mobile/babblePaste.h" +#include "../../MS_sculpt_mobile.h" #include "action_layer.h" #include "action_util.h" -#include "babblePaste.h" #ifdef AUDIO_ENABLE #include "audio.h" From 737c1fe641dd018c9f8a0e333480825d6337ddd1 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Mon, 10 Apr 2017 09:51:00 +0300 Subject: [PATCH 12/22] Make MOUSEKEY_MOVE_MAX and MOUSEKEY_WHEEL_MAX configurable Kitten_paw/ickerwx was doing that --- tmk_core/common/mousekey.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tmk_core/common/mousekey.h b/tmk_core/common/mousekey.h index 6eede06b4..9338d0af7 100644 --- a/tmk_core/common/mousekey.h +++ b/tmk_core/common/mousekey.h @@ -23,8 +23,17 @@ along with this program. If not, see . /* max value on report descriptor */ -#define MOUSEKEY_MOVE_MAX 127 -#define MOUSEKEY_WHEEL_MAX 127 +#ifndef MOUSEKEY_MOVE_MAX + #define MOUSEKEY_MOVE_MAX 127 +#elif MOUSEKEY_MOVE_MAX > 127 + #error MOUSEKEY_MOVE_MAX needs to be smaller than 127 +#endif + +#ifndef MOUSEKEY_WHEEL_MAX + #define MOUSEKEY_WHEEL_MAX 127 +#elif MOUSEKEY_WHEEL_MAX > 127 + #error MOUSEKEY_WHEEL_MAX needs to be smaller than 127 +#endif #ifndef MOUSEKEY_MOVE_DELTA #define MOUSEKEY_MOVE_DELTA 5 From df30d18458b018d6b87c01678037767ddec3e9f4 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Mon, 10 Apr 2017 09:52:10 +0300 Subject: [PATCH 13/22] Fix warnings in kitten_paw/ickerwx keymap --- keyboards/kitten_paw/keymaps/ickerwx/config.h | 2 +- keyboards/kitten_paw/keymaps/ickerwx/keymap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/kitten_paw/keymaps/ickerwx/config.h b/keyboards/kitten_paw/keymaps/ickerwx/config.h index 04a2d253c..142aba890 100644 --- a/keyboards/kitten_paw/keymaps/ickerwx/config.h +++ b/keyboards/kitten_paw/keymaps/ickerwx/config.h @@ -22,7 +22,7 @@ #undef MOUSEKEY_WHEEL_MAX_SPEED #define MOUSEKEY_WHEEL_MAX_SPEED 3 #undef MOUSEKEY_WHEEL_TIME_TO_MAX -#define MOUSEKEY_WHEEL_TIME_TO_MAX 1000 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 255 #undef ONESHOT_TIMEOUT #define ONESHOT_TIMEOUT 500 #undef TAPPING_TOGGLE diff --git a/keyboards/kitten_paw/keymaps/ickerwx/keymap.c b/keyboards/kitten_paw/keymaps/ickerwx/keymap.c index 9a00c80dc..9dffbb272 100644 --- a/keyboards/kitten_paw/keymaps/ickerwx/keymap.c +++ b/keyboards/kitten_paw/keymaps/ickerwx/keymap.c @@ -64,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,S(NUBS),_______,_______,_______,_______,_______,_______,_______,KC_NUBS,S(NUBS),S(MINS), _______, _______, _______,_______,_______,_______, \ _______,_______,_______, _______, _______,_______,_______,_______, _______,_______,_______, _______,_______), /* Layer 3: media layer */ - [MEDIA] = KEYMAP(\ + [MEDIA] = KEYMAP(\ KC_PWR,KC_SLEP,KC_WAKE,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, XXXXXXX,XXXXXXX,XXXXXXX, \ XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, KC_MPRV,KC_MPLY,KC_MNXT, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, \ XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, KC_VOLD,KC_MUTE,KC_VOLU, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, \ From a619b93e38c9d8dff86d5276ff9e549797045f3a Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Mon, 10 Apr 2017 10:12:41 +0300 Subject: [PATCH 14/22] Fix warnings in planck/lucas keymap Register the unshifted version DE_LESS, rather than the shifted DE_MORE --- keyboards/planck/keymaps/lucas/keymap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/planck/keymaps/lucas/keymap.c b/keyboards/planck/keymaps/lucas/keymap.c index 2208780b1..491cd1d07 100644 --- a/keyboards/planck/keymaps/lucas/keymap.c +++ b/keyboards/planck/keymaps/lucas/keymap.c @@ -153,12 +153,12 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case 1: // M(1) if (record->event.pressed) { unregister_code(KC_LSFT); - register_code(DE_MORE); + register_code(DE_LESS); } else { - unregister_code(DE_MORE); + unregister_code(DE_LESS); } break; } return MACRO_NONE; -}; \ No newline at end of file +}; From 109ae2f1e889a2450a98da41f17956c8ce9b79da Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Mon, 10 Apr 2017 10:36:09 +0300 Subject: [PATCH 15/22] Fix warnings in process_printer --- quantum/process_keycode/process_printer.c | 22 ++++++++++---------- quantum/process_keycode/process_printer.h | 2 ++ quantum/process_keycode/process_printer_bb.c | 4 ++-- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/quantum/process_keycode/process_printer.c b/quantum/process_keycode/process_printer.c index 807f7a0b9..613af7018 100644 --- a/quantum/process_keycode/process_printer.c +++ b/quantum/process_keycode/process_printer.c @@ -20,12 +20,12 @@ bool printing_enabled = false; uint8_t character_shift = 0; -void enabled_printing() { +void enable_printing(void) { printing_enabled = true; serial_init(); } -void disable_printing() { +void disable_printing(void) { printing_enabled = false; } @@ -41,9 +41,14 @@ void print_char(char c) { USB_Init(); } -void print_box_string(uint8_t text[]) { - uint8_t len = strlen(text); - uint8_t out[len * 3 + 8]; +void print_string(char c[]) { + for(uint8_t i = 0; i < strlen(c); i++) + print_char(c[i]); +} + +void print_box_string(const char text[]) { + size_t len = strlen(text); + char out[len * 3 + 8]; out[0] = 0xDA; for (uint8_t i = 0; i < len; i++) { out[i+1] = 0xC4; @@ -69,14 +74,9 @@ void print_box_string(uint8_t text[]) { print_string(out); } -void print_string(char c[]) { - for(uint8_t i = 0; i < strlen(c); i++) - print_char(c[i]); -} - bool process_printer(uint16_t keycode, keyrecord_t *record) { if (keycode == PRINT_ON) { - enabled_printing(); + enable_printing(); return false; } if (keycode == PRINT_OFF) { diff --git a/quantum/process_keycode/process_printer.h b/quantum/process_keycode/process_printer.h index aa494ac8a..71d3a4b56 100644 --- a/quantum/process_keycode/process_printer.h +++ b/quantum/process_keycode/process_printer.h @@ -21,4 +21,6 @@ #include "protocol/serial.h" +bool process_printer(uint16_t keycode, keyrecord_t *record); + #endif diff --git a/quantum/process_keycode/process_printer_bb.c b/quantum/process_keycode/process_printer_bb.c index 55d3b552b..3a00f169d 100644 --- a/quantum/process_keycode/process_printer_bb.c +++ b/quantum/process_keycode/process_printer_bb.c @@ -46,7 +46,7 @@ void serial_output(void) { } -void enabled_printing() { +void enable_printing() { printing_enabled = true; serial_output(); serial_high(); @@ -82,7 +82,7 @@ void print_string(char c[]) { bool process_printer(uint16_t keycode, keyrecord_t *record) { if (keycode == PRINT_ON) { - enabled_printing(); + enable_printing(); return false; } if (keycode == PRINT_OFF) { From 08b9eb26c5a7b0d0b1921dc7b4785adb95b5953e Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Mon, 10 Apr 2017 11:52:26 +0300 Subject: [PATCH 16/22] Fix warnings in CMD-Preonic The startup_sound is defined using MUSICAL_NOTEs, since non-constant initializer expressions are not allowed in C. --- keyboards/preonic/keymaps/CMD-Preonic/keymap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/preonic/keymaps/CMD-Preonic/keymap.c b/keyboards/preonic/keymaps/CMD-Preonic/keymap.c index 5d217e261..a500a3649 100644 --- a/keyboards/preonic/keymaps/CMD-Preonic/keymap.c +++ b/keyboards/preonic/keymaps/CMD-Preonic/keymap.c @@ -212,10 +212,10 @@ const uint16_t PROGMEM fn_actions[] = { #ifdef AUDIO_ENABLE float start_up[][2] = { - {440.0*pow(2.0,(14)/12.0), 20}, - {440.0*pow(2.0,(26)/12.0), 8}, - {440.0*pow(2.0,(18)/12.0), 20}, - {440.0*pow(2.0,(26)/12.0), 8} + MUSICAL_NOTE(_B5, 20), + MUSICAL_NOTE(_B6, 8), + MUSICAL_NOTE(_DS6, 20), + MUSICAL_NOTE(_B6, 8), }; float tone_qwerty[][2] = SONG(QWERTY_SOUND); @@ -323,7 +323,7 @@ void matrix_init_user(void) { #ifdef AUDIO_ENABLE -void play_goodbye_tone() +void play_goodbye_tone(void) { PLAY_NOTE_ARRAY(goodbye, false, 0); _delay_ms(150); From abda6ff7bbe00792c0ed7edea4a31b9dec6c13e8 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Wed, 12 Apr 2017 09:02:51 +0300 Subject: [PATCH 17/22] Include host.h from suspend.c --- tmk_core/common/avr/suspend.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c index 0c81e8361..1c7618ff5 100644 --- a/tmk_core/common/avr/suspend.c +++ b/tmk_core/common/avr/suspend.c @@ -9,6 +9,7 @@ #include "suspend.h" #include "timer.h" #include "led.h" +#include "host.h" #ifdef PROTOCOL_LUFA #include "lufa.h" From 07fc34e962a54f87802f11e9e30ed5891325f07e Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Wed, 12 Apr 2017 10:04:19 +0300 Subject: [PATCH 18/22] Fix warnings when ACTION_ONESHOT is disabled --- tmk_core/common/action.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 94de36918..4ba1cc251 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -140,7 +140,6 @@ void process_record(keyrecord_t *record) void process_action(keyrecord_t *record, action_t action) { - bool do_release_oneshot = false; keyevent_t event = record->event; #ifndef NO_ACTION_TAPPING uint8_t tap_count = record->tap.count; @@ -152,6 +151,7 @@ void process_action(keyrecord_t *record, action_t action) } #ifndef NO_ACTION_ONESHOT + bool do_release_oneshot = false; // notice we only clear the one shot layer if the pressed key is not a modifier. if (is_oneshot_layer_active() && event.pressed && !IS_MOD(action.key.code)) { clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); From d8e2ff2964480182f0e3513785e310b4ee96c4ee Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Thu, 13 Apr 2017 15:58:58 +0300 Subject: [PATCH 19/22] Fix process_unicode_common.c being included twice --- build_keyboard.mk | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/build_keyboard.mk b/build_keyboard.mk index 9da8277db..9fa8c3126 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -176,22 +176,26 @@ endif ifeq ($(strip $(UCIS_ENABLE)), yes) OPT_DEFS += -DUCIS_ENABLE - SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c + UNICODE_COMMON = yes SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c endif ifeq ($(strip $(UNICODEMAP_ENABLE)), yes) OPT_DEFS += -DUNICODEMAP_ENABLE - SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c + UNICODE_COMMON = yes SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c endif ifeq ($(strip $(UNICODE_ENABLE)), yes) OPT_DEFS += -DUNICODE_ENABLE - SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c + UNICODE_COMMON = yes SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c endif +ifeq ($(strip $(UNICODE_COMMON)), yes) + SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c +endif + ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) OPT_DEFS += -DRGBLIGHT_ENABLE SRC += $(QUANTUM_DIR)/light_ws2812.c From d68294615f9c67764c06a7524fb59c22c024a106 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Thu, 13 Apr 2017 16:12:55 +0300 Subject: [PATCH 20/22] Add make option for allowing warnings --- tmk_core/rules.mk | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index 25993354f..b7cb0a559 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk @@ -92,7 +92,9 @@ endif endif CFLAGS += -Wall CFLAGS += -Wstrict-prototypes -CFLAGS += -Werror +ifneq ($(strip $(ALLOW_WARNINGS)), yes) + CFLAGS += -Werror +endif #CFLAGS += -mshort-calls #CFLAGS += -fno-unit-at-a-time #CFLAGS += -Wundef @@ -116,7 +118,9 @@ CPPFLAGS += -O$(OPT) CPPFLAGS += -w CPPFLAGS += -Wall CPPFLAGS += -Wundef -CPPFLAGS += -Werror +ifneq ($(strip $(ALLOW_WARNINGS)), yes) + CPPFLAGS += -Werror +endif #CPPFLAGS += -mshort-calls #CPPFLAGS += -fno-unit-at-a-time #CPPFLAGS += -Wstrict-prototypes From 5c251b5575a5008c81b35cd31313591c4910722a Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Thu, 13 Apr 2017 21:40:06 +0300 Subject: [PATCH 21/22] Fix buffer overrun in lcd_keyframes This would often cause the keyboard to crash when restarting the computer. --- quantum/visualizer/lcd_keyframes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quantum/visualizer/lcd_keyframes.c b/quantum/visualizer/lcd_keyframes.c index df11861dd..82e4184d2 100644 --- a/quantum/visualizer/lcd_keyframes.c +++ b/quantum/visualizer/lcd_keyframes.c @@ -125,8 +125,8 @@ static void get_led_state_string(char* output, visualizer_state_t* state) { pos += 5; } if (state->status.leds & (1u << USB_LED_KANA)) { - memcpy(output + pos, "KANA ", 5); - pos += 5; + memcpy(output + pos, "KANA", 4); + pos += 4; } output[pos] = 0; } From 94b14bdd6ac09467686d330571ab05ff0f9bf380 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Thu, 13 Apr 2017 23:00:27 +0300 Subject: [PATCH 22/22] Add missing serial_link.h include Which fixes a warning when building Ergodox Infinity as a righthand master. --- keyboards/ergodox/infinity/matrix.c | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/ergodox/infinity/matrix.c b/keyboards/ergodox/infinity/matrix.c index 1fda90484..3364f8c90 100644 --- a/keyboards/ergodox/infinity/matrix.c +++ b/keyboards/ergodox/infinity/matrix.c @@ -24,6 +24,7 @@ along with this program. If not, see . #include "print.h" #include "debug.h" #include "matrix.h" +#include "serial_link/system/serial_link.h" /*