Browse Source

Workaround for compiler warnings when console disabled.

tags/v2.9
flabbergast 8 years ago
parent
commit
b110884a6d
3 changed files with 12 additions and 7 deletions
  1. 6
    4
      tmk_core/common/command.c
  2. 2
    0
      tmk_core/common/nodebug.h
  3. 4
    3
      tmk_core/common/print.h

+ 6
- 4
tmk_core/common/command.c View File

@@ -350,10 +350,11 @@ static bool command_common(uint8_t code)
case KC_N:
clear_keyboard(); //Prevents stuck keys.
keyboard_nkro = !keyboard_nkro;
if (keyboard_nkro)
if (keyboard_nkro) {
print("NKRO: on\n");
else
} else {
print("NKRO: off\n");
}
break;
#endif
case KC_ESC:
@@ -607,10 +608,11 @@ static bool mousekey_console(uint8_t code)
print("?");
return false;
}
if (mousekey_param)
if (mousekey_param) {
xprintf("M%d> ", mousekey_param);
else
} else {
print("M>" );
}
return true;
}
#endif

+ 2
- 0
tmk_core/common/nodebug.h View File

@@ -18,7 +18,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef NODEBUG_H
#define NODEBUG_H 1

#if !defined(NO_DEBUG)
#define NO_DEBUG
#endif
#include "debug.h"
#undef NO_DEBUG


+ 4
- 3
tmk_core/common/print.h View File

@@ -99,9 +99,9 @@ void print_set_sendchar(int8_t (*print_sendchar_func)(uint8_t));

#else /* NO_PRINT */

#define xprintf
#define print
#define println
#define xprintf(s,...)
#define print(s)
#define println(s)
#define print_set_sendchar(func)
#define print_dec(data)
#define print_decs(data)
@@ -127,6 +127,7 @@ void print_set_sendchar(int8_t (*print_sendchar_func)(uint8_t));
#define print_val_bin_reverse8(v)
#define print_val_bin_reverse16(v)
#define print_val_bin_reverse32(v)
#define init_printf(s,ss)

#endif /* NO_PRINT */


Loading…
Cancel
Save