bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* pipe-filter-gi, pipe-filter-ii: fix gcc warning
@ 2019-04-26 23:27 Bruno Haible
  0 siblings, 0 replies; only message in thread
From: Bruno Haible @ 2019-04-26 23:27 UTC (permalink / raw)
  To: bug-gnulib

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  <bruno@clisp.org>

	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



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-04-26 23:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-26 23:27 pipe-filter-gi, pipe-filter-ii: fix gcc warning Bruno Haible

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).