Skip to content

Commit 3eedebe

Browse files
henrikbrixandersencfriedt
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]>
1 parent 96eee3b commit 3eedebe

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
@@ -14,6 +14,7 @@
1414
static char stdout_buff[_STDOUT_BUF_SIZE];
1515
static int n_pend; /* Number of pending characters in buffer */
1616

17+
#if defined(CONFIG_PRINTK) || defined(CONFIG_STDOUT_CONSOLE)
1718
static int print_char(int c)
1819
{
1920
int printnow = 0;
@@ -36,6 +37,7 @@ static int print_char(int c)
3637
}
3738
return c;
3839
}
40+
#endif /* defined(CONFIG_PRINTK) || defined(CONFIG_STDOUT_CONSOLE) */
3941

4042
/**
4143
* Ensure that whatever was written thru printk is displayed now

0 commit comments

Comments
 (0)