#68 Generated cpp file leads to compiler warnings

closed-fixed
nobody
None
5
2011-12-13
2011-10-03
zhnmju123
No

Hi,

the cpp files generated by wxFormBuilder_v3.2.3-beta lead to many compiler warnings when building with MinGW/GCC 4.61:

wxMenuItem* m_separator1;
m_separator1 = m_menuFile->AppendSeparator();

warning: variable 'm_separator1' set but not used [-Wunused-but-set-variable]|

Since it's a good coding standard to have zero warnings in ones own project, please support this style by generating warning free cpp files.

Regards, ZenJu

Discussion

  • zhnmju123

    zhnmju123 - 2011-12-02

    The warning reported in this ticked still persists with v3.3.0 beta.

    Here is another avoidable warning in the generated code:

    warning: unused variable 'm_listbookResultIndex' [-Wunused-variable]|

    Generated source:
    m_listbookResult = new wxListbook( m_panelBackground, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLB_TOP );
    wxSize m_listbookResultImageSize = wxSize( 180,1 );
    int m_listbookResultIndex = 0;
    wxImageList* m_listbookResultImages = new wxImageList( m_listbookResultImageSize.GetWidth(), m_listbookResultImageSize.GetHeight() );
    m_listbookResult->AssignImageList( m_listbookResultImages );
    wxBitmap m_listbookResultBitmap;
    wxImage m_listbookResultImage;

     
  • Michal Bližňák

    Fixed in wxFB 3.3.1

     
  • Michal Bližňák

    • status: open --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks