Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2024-01-19 13:20:17 +0300
committerCorinna Vinschen <corinna@vinschen.de>2024-01-19 13:51:01 +0300
commit29ec33360da9171f1df27ef59ea4576fda4065ff (patch)
tree667b872e98fa07956ee192510a8b596ef6a634b0 /newlib
parentd13d9220bf47f7e91b02c5c8e214780bda840606 (diff)
ORIENT: avoid "expression has no effect" warning
The warning "right-hand operand of comma expression has no effect [-Wunused-value]" crops up with -Wall in cases where ORIENT is called without checking or assigning its value. Explicitely void the expression in these cases to avoid the warning. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'newlib')
-rw-r--r--newlib/libc/stdio/fwide.c2
-rw-r--r--newlib/libc/stdio/open_memstream.c2
-rw-r--r--newlib/libc/stdio/ungetwc.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/newlib/libc/stdio/fwide.c b/newlib/libc/stdio/fwide.c
index 9b5a3d12a..1d2430468 100644
--- a/newlib/libc/stdio/fwide.c
+++ b/newlib/libc/stdio/fwide.c
@@ -58,7 +58,7 @@ _fwide_r (struct _reent *ptr,
_newlib_flockfile_start (fp);
if (mode != 0) {
- ORIENT (fp, mode);
+ (void) ORIENT (fp, mode);
}
if (!(fp->_flags & __SORD))
ret = 0;
diff --git a/newlib/libc/stdio/open_memstream.c b/newlib/libc/stdio/open_memstream.c
index e3a52ed33..97b13b7bf 100644
--- a/newlib/libc/stdio/open_memstream.c
+++ b/newlib/libc/stdio/open_memstream.c
@@ -367,7 +367,7 @@ internal_open_memstream_r (struct _reent *ptr,
fp->_flags |= __SL64;
#endif
fp->_close = memcloser;
- ORIENT (fp, wide);
+ (void) ORIENT (fp, wide);
_newlib_flockfile_end (fp);
return fp;
}
diff --git a/newlib/libc/stdio/ungetwc.c b/newlib/libc/stdio/ungetwc.c
index 16d37f2d1..a04ca3467 100644
--- a/newlib/libc/stdio/ungetwc.c
+++ b/newlib/libc/stdio/ungetwc.c
@@ -82,7 +82,7 @@ _ungetwc_r (struct _reent *ptr,
size_t len;
_newlib_flockfile_start (fp);
- ORIENT (fp, 1);
+ (void) ORIENT (fp, 1);
if (wc == WEOF)
wc = WEOF;
else if ((len = _wcrtomb_r(ptr, buf, wc, &fp->_mbstate)) == (size_t)-1)