diff options
author | Chris Johns <chrisj@rtems.org> | 2022-06-14 11:23:01 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2022-06-15 13:01:03 +1000 |
commit | acc32a8e5ca57aadbfc59efdff6dc3ec5b27f3c0 (patch) | |
tree | 0d6a04cd375e165a50f3f2af6548bce02dd5a892 /cpukit/libmisc/shell | |
parent | cpukit: Change _COMPILING_NEWLIB to _LIBC for helper functions decls (diff) | |
download | rtems-acc32a8e5ca57aadbfc59efdff6dc3ec5b27f3c0.tar.bz2 |
cpukit: Fixes for GCC 12 warnings
Updates #6442
Diffstat (limited to 'cpukit/libmisc/shell')
-rw-r--r-- | cpukit/libmisc/shell/hexdump-conv.c | 4 | ||||
-rw-r--r-- | cpukit/libmisc/shell/main_edit.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/cpukit/libmisc/shell/hexdump-conv.c b/cpukit/libmisc/shell/hexdump-conv.c index aa16f9b169..24b28353f3 100644 --- a/cpukit/libmisc/shell/hexdump-conv.c +++ b/cpukit/libmisc/shell/hexdump-conv.c @@ -117,7 +117,11 @@ retry: if (clen == 0) clen = 1; else if (clen == (size_t)-1 || (clen == (size_t)-2 && +#ifndef __rtems__ buf == peekbuf)) { +#else /* __rtems__ */ + &buf[0] == &peekbuf[0])) { +#endif /* __rtems__ */ memset(&pr->mbstate, 0, sizeof(pr->mbstate)); wc = *p; clen = 1; diff --git a/cpukit/libmisc/shell/main_edit.c b/cpukit/libmisc/shell/main_edit.c index ed1371f7fa..4cc742719a 100644 --- a/cpukit/libmisc/shell/main_edit.c +++ b/cpukit/libmisc/shell/main_edit.c @@ -55,7 +55,9 @@ #if defined(__linux__) || defined(__rtems__) #include <sys/ioctl.h> #include <termios.h> +#ifndef O_BINARY #define O_BINARY 0 +#endif static int linux_console; #endif |