From acc32a8e5ca57aadbfc59efdff6dc3ec5b27f3c0 Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Tue, 14 Jun 2022 11:23:01 +1000 Subject: cpukit: Fixes for GCC 12 warnings Updates #6442 --- cpukit/libmisc/shell/hexdump-conv.c | 4 ++++ cpukit/libmisc/shell/main_edit.c | 2 ++ 2 files changed, 6 insertions(+) (limited to 'cpukit/libmisc') 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 #include +#ifndef O_BINARY #define O_BINARY 0 +#endif static int linux_console; #endif -- cgit v1.2.3