public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
* [setup - the official Cygwin setup program] branch master, updated. release_2.930-1-gb9c686ca
@ 2024-02-09 14:02 Jon Turney
  0 siblings, 0 replies; only message in thread
From: Jon Turney @ 2024-02-09 14:02 UTC (permalink / raw)
  To: cygwin-apps-cvs




https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=b9c686cadf55807470d64a202b4f569a88dadd67

commit b9c686cadf55807470d64a202b4f569a88dadd67
Author: Jon Turney <jon.turney@dronecode.org.uk>
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


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

only message in thread, other threads:[~2024-02-09 14:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-09 14:02 [setup - the official Cygwin setup program] branch master, updated. release_2.930-1-gb9c686ca Jon Turney

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).