Function cnputc() should never modify it's argument so qualify it with a const keyword.
* device/cons.c (cnputc): Qualify argument as const. * device/cons.h (cnputc): Likewise. --- device/cons.c | 2 +- device/cons.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/device/cons.c b/device/cons.c index ceba7f2..94d4ebf 100644 --- a/device/cons.c +++ b/device/cons.c @@ -141,7 +141,7 @@ cnmaygetc() void cnputc(c) - char c; + const char c; { if (c == 0) return; diff --git a/device/cons.h b/device/cons.h index 8ac796c..32a8739 100644 --- a/device/cons.h +++ b/device/cons.h @@ -53,5 +53,5 @@ extern int cngetc(void); extern int cnmaygetc(void); -extern void cnputc(char); +extern void cnputc(const char); #endif /* _DEVICE_CONS_H */ -- 1.8.1.4