mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-27 16:01:27 +00:00
common/console.c: Fix unused warning with console_doenv()
Newer versions of LLVM-7 will provide an unused function warning over console_doenv() in the case of SYS_CONSOLE_IS_IN_ENV not being enabled as can be the case in SPL. Add guards around this function. Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
0f282c1876
commit
5e63c96aa7
1 changed files with 4 additions and 0 deletions
|
@ -252,10 +252,12 @@ static void console_puts(int file, const char *s)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if CONFIG_IS_ENABLED(SYS_CONSOLE_IS_IN_ENV)
|
||||||
static inline void console_doenv(int file, struct stdio_dev *dev)
|
static inline void console_doenv(int file, struct stdio_dev *dev)
|
||||||
{
|
{
|
||||||
iomux_doenv(file, dev->name);
|
iomux_doenv(file, dev->name);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
static inline int console_getc(int file)
|
static inline int console_getc(int file)
|
||||||
{
|
{
|
||||||
|
@ -283,10 +285,12 @@ static inline void console_puts(int file, const char *s)
|
||||||
stdio_devices[file]->puts(stdio_devices[file], s);
|
stdio_devices[file]->puts(stdio_devices[file], s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if CONFIG_IS_ENABLED(SYS_CONSOLE_IS_IN_ENV)
|
||||||
static inline void console_doenv(int file, struct stdio_dev *dev)
|
static inline void console_doenv(int file, struct stdio_dev *dev)
|
||||||
{
|
{
|
||||||
console_setfile(file, dev);
|
console_setfile(file, dev);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#endif /* CONIFIG_IS_ENABLED(CONSOLE_MUX) */
|
#endif /* CONIFIG_IS_ENABLED(CONSOLE_MUX) */
|
||||||
|
|
||||||
/** U-Boot INITIAL CONSOLE-NOT COMPATIBLE FUNCTIONS *************************/
|
/** U-Boot INITIAL CONSOLE-NOT COMPATIBLE FUNCTIONS *************************/
|
||||||
|
|
Loading…
Add table
Reference in a new issue