warnings patch submission - Mailing list pgadmin-hackers

From Richard PALO
Subject warnings patch submission
Date
Msg-id ksbgl2$kmf$1@ger.gmane.org
Whole thread Raw
Responses Re: warnings patch submission  (Dave Page <dpage@pgadmin.org>)
List pgadmin-hackers
The following patch should get over the (in this case cosmetic) warning:
> ./gqb/gqbView.cpp: In member function 'void gqbView::onMotion(wxMouseEvent&)':
> ./gqb/gqbView.cpp:344:16: warning: converting 'false' to pointer type 'gqbObject*' [-Wconversion-null]
>     anySelected = false;
>                 ^


diff --git a/pgadmin/gqb/gqbView.cpp b/pgadmin/gqb/gqbView.cpp
index 3afe4c8..9d5bab6 100644
--- a/pgadmin/gqb/gqbView.cpp
+++ b/pgadmin/gqb/gqbView.cpp
@@ -341,7 +341,7 @@ void gqbView::onMotion(wxMouseEvent &event)
                 }
                 else
                 {
-                       anySelected = false;
+                       anySelected = NULL;
                         mode = pt_normal;
                 }



==================================================================
On the other hand, the maintainer may wish to take a look at the
following warnings in pgadmin/ogl/drawn.cpp:

> ./ogl/drawn.cpp: In member function 'virtual void wxOpSetGDI::Do(wxDC&, double, double)':
> ./ogl/drawn.cpp:423:53: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>     if (m_image->m_outlineColours.Member((wxObject *)m_gdiIndex))
>                                                      ^
> ./ogl/drawn.cpp:444:53: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>     if (m_image->m_outlineColours.Member((wxObject *)m_gdiIndex))
>                                                      ^
> ./ogl/drawn.cpp:454:55: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>     else if (m_image->m_fillColours.Member((wxObject *)m_gdiIndex))
>                                                        ^
> ./ogl/drawn.cpp: In member function 'virtual void wxPseudoMetaFile::SetPen(wxPen*, bool)':
> ./ogl/drawn.cpp:2443:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>    m_outlineColours.Append((wxObject *) (n - 1));
>                                               ^
> ./ogl/drawn.cpp: In member function 'virtual void wxPseudoMetaFile::SetBrush(wxBrush*, bool)':
> ./ogl/drawn.cpp:2458:43: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>    m_fillColours.Append((wxObject *) (n - 1));
>                                            ^
              ^

pgadmin-hackers by date:

Previous
From: Dave Page
Date:
Subject: pgAdmin III commit: Fix build for wx 2.9.5, along with an RPATH issue.
Next
From: Dave Page
Date:
Subject: pgAdmin III commit: Fix assignment.