Fix a few warnings from Coverity; nothing dangerous, I don't think.
authorCarl Hetherington <cth@carlh.net>
Sun, 8 Feb 2015 18:39:09 +0000 (18:39 +0000)
committerCarl Hetherington <cth@carlh.net>
Sun, 8 Feb 2015 18:39:09 +0000 (18:39 +0000)
src/tools/dcpomatic.cc
src/wx/config_dialog.cc
src/wx/download_certificate_dialog.cc
src/wx/kdm_dialog.cc
src/wx/screen_dialog.cc

index e929f185d1fa75e4339d4dbaff7f92dbf943f5b8..21cd10c26f7e16dbdd66f541dd9e45dd6b7f35fb 100644 (file)
@@ -755,6 +755,14 @@ static const wxCmdLineEntryDesc command_line_description[] = {
  */
 class App : public wxApp
 {
+public:
+       App ()
+               : wxApp ()
+               , _frame (0)
+       {}
+
+private:       
+               
        bool OnInit ()
        try
        {
index e8cf8b2635309432e24d1bc4b6c5e7f7d2cf6962..368a94636a4515b0b4724abb7ae638ec6b2b7675 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -86,6 +86,11 @@ public:
        GeneralPage (wxSize panel_size, int border)
                : wxStockPreferencesPage (Kind_General)
                , Page (panel_size, border)
+               , _set_language (0)
+               , _language (0)
+               , _num_local_encoding_threads (0)
+               , _check_for_updates (0)
+               , _check_for_test_updates (0)
        {}
 
        wxWindow* CreateWindow (wxWindow* parent)
@@ -234,6 +239,14 @@ class DefaultsPage : public wxPreferencesPage, public Page
 public:
        DefaultsPage (wxSize panel_size, int border)
                : Page (panel_size, border)
+               , _j2k_bandwidth (0)
+               , _audio_delay (0)
+               , _isdcf_metadata_button (0)
+               , _still_length (0)
+               , _directory (0)
+               , _container (0)
+               , _dcp_content_type (0)
+               , _issuer (0)
        {}
        
        wxString GetName () const
@@ -424,6 +437,8 @@ class EncodingServersPage : public wxPreferencesPage, public Page
 public:
        EncodingServersPage (wxSize panel_size, int border)
                : Page (panel_size, border)
+               , _use_any_servers (0)
+               , _servers_list (0)
        {}
        
        wxString GetName () const
@@ -528,6 +543,18 @@ class KeysPage : public wxPreferencesPage, public Page
 public:
        KeysPage (wxSize panel_size, int border)
                : Page (panel_size, border)
+               , _panel (0)
+               , _certificates (0)
+               , _add_certificate (0)
+               , _remove_certificate (0)
+               , _remake_certificates (0)
+               , _signer_private_key (0)
+               , _load_signer_private_key (0)
+               , _decryption_certificate (0)
+               , _load_decryption_certificate (0)
+               , _decryption_private_key (0)
+               , _load_decryption_private_key (0)
+               , _export_decryption_certificate (0)
        {}
 
        wxString GetName () const
@@ -861,6 +888,10 @@ class TMSPage : public wxPreferencesPage, public Page
 public:
        TMSPage (wxSize panel_size, int border)
                : Page (panel_size, border)
+               , _tms_ip (0)
+               , _tms_path (0)
+               , _tms_user (0)
+               , _tms_password (0)
        {}
 
        wxString GetName () const
@@ -946,6 +977,15 @@ public:
 
        KDMEmailPage (wxSize panel_size, int border)
                : Page (panel_size, border)
+               , _mail_server (0)
+               , _mail_user (0)
+               , _mail_password (0)
+               , _kdm_subject (0)
+               , _kdm_from (0)
+               , _kdm_cc (0)
+               , _kdm_bcc (0)
+               , _kdm_email (0)
+               , _reset_kdm_email (0)
        {}
        
        wxString GetName () const
@@ -1106,6 +1146,12 @@ public:
        AdvancedPage (wxSize panel_size, int border)
                : wxStockPreferencesPage (Kind_Advanced)
                , Page (panel_size, border)
+               , _maximum_j2k_bandwidth (0)
+               , _allow_any_dcp_frame_rate (0)
+               , _log_general (0)
+               , _log_warning (0)
+               , _log_error (0)
+               , _log_timing (0)
        {}
        
        wxWindow* CreateWindow (wxWindow* parent)
index abb1e61260aa7bf8ace8451317c8dcc6e822057d..a8a71233494c35b163bd42b1932d3f99266c9115 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2014-2015 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -26,6 +26,8 @@ using boost::function;
 DownloadCertificateDialog::DownloadCertificateDialog (wxWindow* parent, function<void (boost::filesystem::path)> load)
        : TableDialog (parent, _("Download certificate"), 2, true)
        , _load (load)
+       , _message (0)
+       , _download (0)
 {
 
 }
index 9b1d6bc98ed1e12fdc0811b26f95a4f486ad6c0b..3e630148268bfee9f7a7807a901eb67f2d0dcc04 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -274,7 +274,9 @@ KDMDialog::setup_sensitivity ()
        _remove_screen->Enable (ss);
 
        wxButton* ok = dynamic_cast<wxButton *> (FindWindowById (wxID_OK));
-       ok->Enable ((selected_cinemas().size() > 0 || selected_screens().size() > 0) && sd);
+       if (ok) {
+               ok->Enable ((selected_cinemas().size() > 0 || selected_screens().size() > 0) && sd);
+       }
 
        _folder->Enable (_write_to->GetValue ());
 }
index 503745683980f3b2a860ec09050c2b80bba01a84..8285ddb9625bc35861858da8932e0837bbd504fa 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -128,7 +128,9 @@ void
 ScreenDialog::setup_sensitivity ()
 {
        wxButton* ok = dynamic_cast<wxButton*> (FindWindowById (wxID_OK, this));
-       ok->Enable (_certificate);
+       if (ok) {
+               ok->Enable (_certificate);
+       }
 
        _download_certificate->Enable (
                _manufacturer->GetStringSelection() == _("Doremi") ||