Skip to content

Commit f88a83a

Browse files
henrikbrixandersenaescolar
authored andcommitted
drivers: console: posix_arch_console: remove build warning
Remove build warning when building the posix_arch_console driver with CONFIG_PRINTK=n and CONFIG_STDOUT_CONSOLE=n. Fixes: #93790 Signed-off-by: Henrik Brix Andersen <[email protected]> (cherry picked from commit 3eedebe)
1 parent 9cd8d8f commit f88a83a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/console/posix_arch_console.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
static char stdout_buff[_STDOUT_BUF_SIZE];
1313
static int n_pend; /* Number of pending characters in buffer */
1414

15+
#if defined(CONFIG_PRINTK) || defined(CONFIG_STDOUT_CONSOLE)
1516
static int print_char(int c)
1617
{
1718
int printnow = 0;
@@ -34,6 +35,7 @@ static int print_char(int c)
3435
}
3536
return c;
3637
}
38+
#endif /* defined(CONFIG_PRINTK) || defined(CONFIG_STDOUT_CONSOLE) */
3739

3840
/**
3941
* Ensure that whatever was written thru printk is displayed now

0 commit comments

Comments
 (0)