mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-27 19:17:18 +08:00
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>
This commit is contained in:
parent
d13d9220bf
commit
29ec33360d
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user