summaryrefslogtreecommitdiff
path: root/libc/stdio
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2005-01-19 10:31:51 +0000
committerPeter Kjellerstedt <peter.kjellerstedt@axis.com>2005-01-19 10:31:51 +0000
commitacd92003c8145079c6226211848e26b0472d8445 (patch)
tree56f271fbcb5b1453d93b89843daedfff749d2419 /libc/stdio
parent7b735a37585a73e8ec60a03ff52e24fe98f10cec (diff)
Avoid compiler warnings.
Diffstat (limited to 'libc/stdio')
-rw-r--r--libc/stdio/_trans2r.c4
-rw-r--r--libc/stdio/_trans2w.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/libc/stdio/_trans2r.c b/libc/stdio/_trans2r.c
index d33d9eba8..9afb75428 100644
--- a/libc/stdio/_trans2r.c
+++ b/libc/stdio/_trans2r.c
@@ -41,9 +41,13 @@ int __stdio_trans2r(FILE * __restrict stream)
#endif
if (stream->__modeflags & __FLAG_WRITEONLY) {
+#if defined(__UCLIBC_HAS_WCHAR__) || !defined(__UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION__)
DO_EBADF:
+#endif
__set_errno(EBADF);
+#ifdef __UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION__
ERROR:
+#endif
__STDIO_STREAM_SET_ERROR(stream);
__STDIO_STREAM_VALIDATE(stream);
return EOF;
diff --git a/libc/stdio/_trans2w.c b/libc/stdio/_trans2w.c
index fdde2bebf..7ab3403c0 100644
--- a/libc/stdio/_trans2w.c
+++ b/libc/stdio/_trans2w.c
@@ -40,9 +40,13 @@ int __stdio_trans2w(FILE * __restrict stream)
#endif
if (stream->__modeflags & __FLAG_READONLY) {
+#if defined(__UCLIBC_HAS_WCHAR__) || !defined(__UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION__)
DO_EBADF:
+#endif
__set_errno(EBADF);
+#ifdef __UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION__
ERROR:
+#endif
__STDIO_STREAM_SET_ERROR(stream);
__STDIO_STREAM_VALIDATE(stream);
return EOF;