Skip to content
6 changes: 5 additions & 1 deletion builddefs/common_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,12 @@ ifeq ($(strip $(DEBUG_ENABLE)),yes)
ASFLAGS += -ggdb3
endif

# Always create a map file to see what was compiled and where.
# Create a map file to see what was compiled and where, unless disabled
# (e.g. test builds, which use the host linker — Apple's ld does not accept
# -Map=/--cref).
ifneq ($(strip $(CREATE_MAP)), no)
LDFLAGS += -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref
endif

#---------------- C Compiler Options ----------------

Expand Down
2 changes: 1 addition & 1 deletion docs/features/unicode.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Add the following to your `config.h`:
|`UNICODE_KEY_MAC` |`KC_LEFT_ALT` |The key to hold when beginning a Unicode sequence with the macOS input mode |
|`UNICODE_KEY_LNX` |`LCTL(LSFT(KC_U))`|The key to tap when beginning a Unicode sequence with the Linux input mode |
|`UNICODE_KEY_WINC` |`KC_RIGHT_ALT` |The key to hold when beginning a Unicode sequence with the WinCompose input mode|
|`UNICODE_SELECTED_MODES`|`-1` |A comma separated list of input modes for cycling through |
|`UNICODE_SELECTED_MODES`|*n/a* |A comma separated list of input modes for cycling through |
|`UNICODE_CYCLE_PERSIST` |`true` |Whether to persist the current Unicode input mode to EEPROM |
|`UNICODE_TYPE_DELAY` |`10` |The amount of time to wait, in milliseconds, between Unicode sequence keystrokes|

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,9 @@ void print_eeprom(void) {
}
xprintf("%04x", i);
}
if (i % 8 == 0) print(" ");
if (i % 8 == 0) {
print(" ");
}

xprintf(" %02x", DataBuf[i]);
if ((i + 1) % 16 == 0) {
Expand Down
4 changes: 2 additions & 2 deletions platforms/test/drivers/audio_pwm_hardware.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
#include "audio.h"

void audio_driver_initialize_impl(void) {}
void audio_driver_start_impl() {}
void audio_driver_stop_impl() {}
void audio_driver_start_impl(void) {}
void audio_driver_stop_impl(void) {}
6 changes: 5 additions & 1 deletion platforms/timer.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
// Copyright 2023 Sergey Vlasov (@sigprof)
// SPDX-License-Identifier: GPL-2.0-or-later

#include "timer.h"
// Use an angle-bracket include so the header is located via the include
// search path rather than source-relative lookup. timer.h uses
// #include_next to chain to the active platform's _timer.h, and that
// only has well-defined semantics when timer.h itself was found via -I.
#include <timer.h>

// Generate out-of-line copies for inline functions defined in timer.h.
extern inline fast_timer_t timer_read_fast(void);
Expand Down
4 changes: 2 additions & 2 deletions quantum/encoder/tests/encoder_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ extern "C" {
}

struct update {
int8_t index;
bool clockwise;
uint8_t index;
bool clockwise;
};

uint8_t updates_array_idx = 0;
Expand Down
4 changes: 2 additions & 2 deletions quantum/encoder/tests/encoder_tests_split_left_eq_right.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ extern "C" {
}

struct update {
int8_t index;
bool clockwise;
uint8_t index;
bool clockwise;
};

uint8_t updates_array_idx = 0;
Expand Down
4 changes: 2 additions & 2 deletions quantum/encoder/tests/encoder_tests_split_left_gt_right.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ extern "C" {
}

struct update {
int8_t index;
bool clockwise;
uint8_t index;
bool clockwise;
};

uint8_t updates_array_idx = 0;
Expand Down
4 changes: 2 additions & 2 deletions quantum/encoder/tests/encoder_tests_split_left_lt_right.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ extern "C" {
}

struct update {
int8_t index;
bool clockwise;
uint8_t index;
bool clockwise;
};

uint8_t updates_array_idx = 0;
Expand Down
4 changes: 2 additions & 2 deletions quantum/encoder/tests/encoder_tests_split_no_left.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ extern "C" {
}

struct update {
int8_t index;
bool clockwise;
uint8_t index;
bool clockwise;
};

uint8_t updates_array_idx = 0;
Expand Down
4 changes: 2 additions & 2 deletions quantum/encoder/tests/encoder_tests_split_no_right.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ extern "C" {
}

struct update {
int8_t index;
bool clockwise;
uint8_t index;
bool clockwise;
};

uint8_t updates_array_idx = 0;
Expand Down
2 changes: 1 addition & 1 deletion quantum/process_keycode/process_key_override.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ const key_override_t *clear_active_override(const bool allow_reregister) {

const key_override_t *const old = active_override;

const uint8_t mod_free_replacement = clear_mods_from(active_override->replacement);
const uint16_t mod_free_replacement = clear_mods_from(active_override->replacement);

bool unregister_replacement = mod_free_replacement != KC_NO && // KC_NO is never registered
mod_free_replacement < SAFE_RANGE; // Custom keycodes are never registered
Expand Down
2 changes: 1 addition & 1 deletion quantum/process_keycode/process_space_cadet.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,6 @@ bool process_space_cadet(uint16_t keycode, keyrecord_t *record) {
return true;
}

void reset_space_cadet() {
void reset_space_cadet(void) {
sc_last = 0;
}
12 changes: 3 additions & 9 deletions quantum/unicode/unicode.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@
# define UNICODE_KEY_WINC KC_RIGHT_ALT
#endif

// Comma-delimited, ordered list of input modes selected for use (e.g. in cycle)
// Example: #define UNICODE_SELECTED_MODES UNICODE_MODE_WINCOMPOSE, UNICODE_MODE_LINUX
#ifndef UNICODE_SELECTED_MODES
# define UNICODE_SELECTED_MODES -1
#endif

// Whether input mode changes in cycle should be written to EEPROM
#ifndef UNICODE_CYCLE_PERSIST
# define UNICODE_CYCLE_PERSIST true
Expand All @@ -66,7 +60,7 @@ unicode_config_t unicode_config;
uint8_t unicode_saved_mods;
led_t unicode_saved_led_state;

#if UNICODE_SELECTED_MODES != -1
#ifdef UNICODE_SELECTED_MODES
static uint8_t selected[] = {UNICODE_SELECTED_MODES};
static int8_t selected_count = ARRAY_SIZE(selected);
static int8_t selected_index;
Expand Down Expand Up @@ -136,7 +130,7 @@ static void unicode_play_song(uint8_t mode) {

void unicode_input_mode_init(void) {
eeconfig_read_unicode_mode(&unicode_config);
#if UNICODE_SELECTED_MODES != -1
#ifdef UNICODE_SELECTED_MODES
# if UNICODE_CYCLE_PERSIST
// Find input_mode in selected modes
int8_t i;
Expand Down Expand Up @@ -178,7 +172,7 @@ void set_unicode_input_mode(uint8_t mode) {
}

static void cycle_unicode_input_mode(int8_t offset) {
#if UNICODE_SELECTED_MODES != -1
#ifdef UNICODE_SELECTED_MODES
selected_index = (selected_index + offset) % selected_count;
if (selected_index < 0) {
selected_index += selected_count;
Expand Down
2 changes: 1 addition & 1 deletion tests/test_common/keyboard_report_util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ class KeyboardReportMatcher : public testing::MatcherInterface<report_keyboard_t

template <typename... Ts>
inline testing::Matcher<report_keyboard_t&> KeyboardReport(Ts... keys) {
return testing::MakeMatcher(new KeyboardReportMatcher(std::vector<uint8_t>({keys...})));
return testing::MakeMatcher(new KeyboardReportMatcher({static_cast<uint8_t>(keys)...}));
}
2 changes: 1 addition & 1 deletion tmk_core/protocol/usb_device_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ void usb_device_state_set_protocol(usb_hid_protocol_t protocol) {
notify_usb_device_state_change(usb_device_state);
}

inline usb_hid_protocol_t usb_device_state_get_protocol() {
inline usb_hid_protocol_t usb_device_state_get_protocol(void) {
return usb_device_state.protocol;
}

Expand Down