1
0

Workaround for compiler warnings when console disabled.

This commit is contained in:
flabbergast 2015-12-03 09:05:09 +00:00
parent f108623011
commit b110884a6d
3 changed files with 12 additions and 7 deletions

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

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

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 */