From 7a5618df777dc7eaa65920eb715d690a85d6dc0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=CC=81clav=20Slavi=CC=81k?= Date: Mon, 20 Jan 2020 19:19:40 +0100 Subject: [PATCH] Silence Xcode 11 warnings about shadowing read() --- include/wx/file.h | 5 +++++ include/wx/stream.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/include/wx/file.h b/include/wx/file.h index 3ca1d4dde4..282994c87e 100644 --- a/include/wx/file.h +++ b/include/wx/file.h @@ -32,11 +32,16 @@ class WXDLLIMPEXP_BASE wxFile public: // more file constants // ------------------- + // suppress Xcode 11 warning about shadowing global read() symbol + wxCLANG_WARNING_SUPPRESS(shadow) + // opening mode enum OpenMode { read, write, read_write, write_append, write_excl }; // standard values for file descriptor enum { fd_invalid = -1, fd_stdin, fd_stdout, fd_stderr }; + wxCLANG_WARNING_RESTORE(shadow) + // static functions // ---------------- // check whether a regular file by this name exists diff --git a/include/wx/stream.h b/include/wx/stream.h index 52217f6fd3..496494f3e8 100644 --- a/include/wx/stream.h +++ b/include/wx/stream.h @@ -420,6 +420,9 @@ private: class WXDLLIMPEXP_BASE wxStreamBuffer { public: + // suppress Xcode 11 warning about shadowing global read() symbol + wxCLANG_WARNING_SUPPRESS(shadow) + enum BufMode { read, @@ -427,6 +430,8 @@ public: read_write }; + wxCLANG_WARNING_RESTORE(shadow) + wxStreamBuffer(wxStreamBase& stream, BufMode mode) { InitWithStream(stream, mode);