Added dummy handlers to prevent warnings when semihosting is disabled

rocketry
Richard Eoin Meadows 2014-08-19 20:59:05 +01:00
rodzic b1bfe5d033
commit 72b5f7a23e
2 zmienionych plików z 10 dodań i 3 usunięć

Wyświetl plik

@ -33,9 +33,11 @@
#ifndef __SEMIHOSTING__ #ifndef __SEMIHOSTING__
/* Dummy function handlers */ /* Dummy function handlers */
#define semihost_putchar(c) #define semihost_putchar(c) (void)(c)
#define semihost_puts(s) #define semihost_puts(s) (void)(s)
#define semihost_printf(...) #define semihost_printf(...) __dummy_printf(__VA_ARGS__)
void __dummy_printf(const char *format, ...);
#else #else
@ -51,6 +53,8 @@ void __putchar(char c);
void __puts(const char* s); void __puts(const char* s);
void __printf(const char *format, ...); void __printf(const char *format, ...);
#endif /* __SEMIHOSTING__ */ #endif /* __SEMIHOSTING__ */
#endif /* SEMIHOSTING_H */ #endif /* SEMIHOSTING_H */

Wyświetl plik

@ -51,3 +51,6 @@ void __printf(const char *format, ...) {
vprintf(format, args); vprintf(format, args);
} }
} }
void __dummy_printf(const char* format, ...) {
(void)format;
}