[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
pipe-filter-gi, pipe-filter-ii: fix gcc warning
From: |
Bruno Haible |
Subject: |
pipe-filter-gi, pipe-filter-ii: fix gcc warning |
Date: |
Sat, 27 Apr 2019 01:27:52 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-141-generic; KDE/5.18.0; x86_64; ; ) |
On mingw, I'm seeing this warning:
In file included from pipe-filter-ii.c:163:0:
pipe-filter-aux.h:75:0: warning: "read" redefined
#define read nonintr_read
In file included from ./fcntl.h:67:0,
from pipe-filter-ii.c:23:
./unistd.h:1785:0: note: this is the location of the previous definition
# define read rpl_read
This patch should fix the warning.
2019-04-26 Bruno Haible <address@hidden>
pipe-filter-gi, pipe-filter-ii: Fix gcc warning.
* lib/pipe-filter-aux.h (read): Undefine before redefinition.
diff --git a/lib/pipe-filter-aux.h b/lib/pipe-filter-aux.h
index f7e8689..4b33322 100644
--- a/lib/pipe-filter-aux.h
+++ b/lib/pipe-filter-aux.h
@@ -72,6 +72,7 @@ nonintr_read (int fd, void *buf, size_t count)
return retval;
}
+#undef read /* avoid warning related to gnulib module unistd */
#define read nonintr_read
PIPE_FILTER_AUX_INLINE ssize_t
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- pipe-filter-gi, pipe-filter-ii: fix gcc warning,
Bruno Haible <=