[setup - the official Cygwin setup program] branch master, updated. release_2.930-1-gb9c686ca
Jon Turney via Cygwin-apps-cvs <[email protected]> Fri, 9 Feb 2024 14:02:50 +0000 (GMT)
| Newsgroups | gmane.os.cygwin.cvs.apps |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=b9c686cadf55807470d64a202b4f569a88dadd67 commit b9c686cadf55807470d64a202b4f569a88dadd67 Author: Jon Turney <[email protected]> Date: Fri May 19 20:18:23 2017 +0100 Fix -Woverloaded-virtual warnings about Window::Create() In gcc 13, -Wall turns on -Woverloaded-virtual These virtual methods seem to be never actually used currently: * PropPage-derived classes have a Create() which explicitly calls PropPage::Create(). * PropPage::Create() and PropSheet::Create() do not call Window::Create() (which is thus unused). * We instantiate objects of Propage-derived and PropSheet types and directly call their Create() method. So simply fix the warning by removing the 'virtual' specifier. Diff: --- proppage.h | 10 +++++----- propsheet.h | 5 ++--- window.h | 7 +++---- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/proppage.h b/proppage.h index 64f822b5..9db1a907 100644 --- a/proppage.h +++ b/proppage.h @@ -115,11 +115,11 @@ public: IsLast = false; }; - virtual bool Create (int TemplateID); - virtual bool Create (DLGPROC dlgproc, int TemplateID); - virtual bool Create (DLGPROC dlgproc, - BOOL (*cmdproc) (HWND h, int id, HWND hwndctl, - UINT code), int TemplateID); + bool Create (int TemplateID); + bool Create (DLGPROC dlgproc, int TemplateID); + bool Create (DLGPROC dlgproc, + BOOL (*cmdproc) (HWND h, int id, HWND hwndctl, + UINT code), int TemplateID); virtual void OnInit () { diff --git a/propsheet.h b/propsheet.h index b900e790..c1ddae59 100644 --- a/propsheet.h +++ b/propsheet.h @@ -47,9 +47,8 @@ public: void SetHWNDFromPage (HWND h); void AdjustPageSize (HWND page); - virtual bool Create (const Window * Parent = NULL, - DWORD Style = - WS_OVERLAPPEDWINDOW | WS_VISIBLE | WS_CLIPCHILDREN); + bool Create (const Window * Parent = NULL, + DWORD Style = WS_OVERLAPPEDWINDOW | WS_VISIBLE | WS_CLIPCHILDREN); void AddPage (PropertyPage * p); diff --git a/window.h b/window.h index 1dfb2a9f..dcc81c1b 100644 --- a/window.h +++ b/window.h @@ -82,10 +82,9 @@ public: Window (); virtual ~ Window (); - virtual bool Create (Window * Parent = NULL, - DWORD Style = - WS_OVERLAPPEDWINDOW | WS_VISIBLE | WS_CLIPCHILDREN); - + bool Create (Window * Parent = NULL, + DWORD Style = WS_OVERLAPPEDWINDOW | WS_VISIBLE | WS_CLIPCHILDREN); + static void SetAppInstance (HINSTANCE h) { // This only has to be called once in the entire app, before