From 2370c03b83e1a074c6b7362885e69bc364553e49 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 26 Jul 2020 19:41:41 +0200 Subject: Update deprecated method call. --- src/tools/dcpomatic_disk_writer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tools') diff --git a/src/tools/dcpomatic_disk_writer.cc b/src/tools/dcpomatic_disk_writer.cc index bac5f9084..66d38ec19 100644 --- a/src/tools/dcpomatic_disk_writer.cc +++ b/src/tools/dcpomatic_disk_writer.cc @@ -525,7 +525,7 @@ try #ifdef DCPOMATIC_LINUX polkit_authority = polkit_authority_get_sync (0, 0); - PolkitSubject* subject = polkit_unix_process_new (getppid()); + PolkitSubject* subject = polkit_unix_process_new_for_owner (getppid(), 0, -1); Parameters* parameters = new Parameters; parameters->dcp_path = *dcp_path; parameters->device = *device; -- cgit v1.2.3 From 6eba051dcbb8c56e3e2efea946ce0380d17a7b33 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 26 Jul 2020 21:29:43 +0200 Subject: Various OSX warnings fixes. --- src/lib/cross.h | 5 +++-- src/lib/cross_osx.cc | 18 ++++++++++++++---- src/lib/encode_server.cc | 4 +++- src/lib/j2k_encoder.cc | 6 +++++- src/lib/json_server.cc | 4 +++- src/lib/render_text.cc | 3 +++ src/lib/util.cc | 2 ++ src/lib/wscript | 2 +- src/tools/dcpomatic.cc | 10 +++------- src/tools/dcpomatic_disk.cc | 7 ++----- src/tools/dcpomatic_disk_writer.cc | 4 ++++ src/tools/dcpomatic_kdm.cc | 6 ++---- src/tools/dcpomatic_player.cc | 9 ++------- src/tools/dcpomatic_playlist.cc | 9 ++------- src/wx/gl_video_view.cc | 2 ++ wscript | 4 ++-- 16 files changed, 53 insertions(+), 42 deletions(-) (limited to 'src/tools') diff --git a/src/lib/cross.h b/src/lib/cross.h index 4d3d2b2c7..64cb2e6b8 100644 --- a/src/lib/cross.h +++ b/src/lib/cross.h @@ -40,12 +40,13 @@ class Log; struct AVIOContext; -void dcpomatic_sleep_seconds (int); -void dcpomatic_sleep_milliseconds (int); +extern void dcpomatic_sleep_seconds (int); +extern void dcpomatic_sleep_milliseconds (int); extern std::string cpu_info (); extern void run_ffprobe (boost::filesystem::path, boost::filesystem::path); extern std::list > mount_info (); extern boost::filesystem::path openssl_path (); +extern void make_foreground_application (); #ifdef DCPOMATIC_DISK extern boost::filesystem::path disk_writer_path (); #endif diff --git a/src/lib/cross_osx.cc b/src/lib/cross_osx.cc index 574cc8660..aa05df016 100644 --- a/src/lib/cross_osx.cc +++ b/src/lib/cross_osx.cc @@ -24,6 +24,7 @@ #include "dcpomatic_log.h" #include "config.h" #include "exceptions.h" +#include "warnings.h" #include #include extern "C" { @@ -35,6 +36,7 @@ extern "C" { #if BOOST_VERSION >= 106100 #include #endif +#include #include #include #include @@ -180,10 +182,7 @@ Waker::nudge () Waker::Waker () { boost::mutex::scoped_lock lm (_mutex); - /* We should use this */ - // IOPMAssertionCreateWithName (kIOPMAssertionTypeNoIdleSleep, kIOPMAssertionLevelOn, CFSTR ("Encoding DCP"), &_assertion_id); - /* but it's not available on 10.5, so we use this */ - IOPMAssertionCreate (kIOPMAssertionTypeNoIdleSleep, kIOPMAssertionLevelOn, &_assertion_id); + IOPMAssertionCreateWithName (kIOPMAssertionTypeNoIdleSleep, kIOPMAssertionLevelOn, CFSTR ("Encoding DCP"), &_assertion_id); } Waker::~Waker () @@ -566,3 +565,14 @@ disk_write_finished () } + +void +make_foreground_application () +{ + ProcessSerialNumber serial; +DCPOMATIC_DISABLE_WARNINGS + GetCurrentProcess (&serial); +DCPOMATIC_ENABLE_WARNINGS + TransformProcessType (&serial, kProcessTransformToForegroundApplication); +} + diff --git a/src/lib/encode_server.cc b/src/lib/encode_server.cc index 61e0b09c5..c30fc8f30 100644 --- a/src/lib/encode_server.cc +++ b/src/lib/encode_server.cc @@ -239,9 +239,11 @@ EncodeServer::run () } for (int i = 0; i < _num_threads; ++i) { - boost::thread* t = _worker_threads.create_thread (bind(&EncodeServer::worker_thread, this)); #ifdef DCPOMATIC_LINUX + boost::thread* t = _worker_threads.create_thread (bind(&EncodeServer::worker_thread, this)); pthread_setname_np (t->native_handle(), "encode-server-worker"); +#else + _worker_threads.create_thread (bind(&EncodeServer::worker_thread, this)); #endif } diff --git a/src/lib/j2k_encoder.cc b/src/lib/j2k_encoder.cc index 498050073..d8d8209c9 100644 --- a/src/lib/j2k_encoder.cc +++ b/src/lib/j2k_encoder.cc @@ -389,11 +389,15 @@ J2KEncoder::servers_list_changed () if (!Config::instance()->only_servers_encode ()) { for (int i = 0; i < Config::instance()->master_encoding_threads (); ++i) { - boost::thread* t = _threads->create_thread(boost::bind(&J2KEncoder::encoder_thread, this, optional())); #ifdef DCPOMATIC_LINUX + boost::thread* t = _threads->create_thread(boost::bind(&J2KEncoder::encoder_thread, this, optional())); pthread_setname_np (t->native_handle(), "encode-worker"); #endif +#ifdef DCPOMATIC_OSX + _threads->create_thread(boost::bind(&J2KEncoder::encoder_thread, this, optional())); +#endif #ifdef DCPOMATIC_WINDOWS + boost::thread* t = _threads->create_thread(boost::bind(&J2KEncoder::encoder_thread, this, optional())); if (windows_xp) { SetThreadAffinityMask (t->native_handle(), 1 << i); } diff --git a/src/lib/json_server.cc b/src/lib/json_server.cc index 3f43a75eb..4cff27b6f 100644 --- a/src/lib/json_server.cc +++ b/src/lib/json_server.cc @@ -52,9 +52,11 @@ enum State { JSONServer::JSONServer (int port) { - thread* t = new thread (boost::bind (&JSONServer::run, this, port)); #ifdef DCPOMATIC_LINUX + thread* t = new thread (boost::bind (&JSONServer::run, this, port)); pthread_setname_np (t->native_handle(), "json-server"); +#else + new thread (boost::bind (&JSONServer::run, this, port)); #endif } diff --git a/src/lib/render_text.cc b/src/lib/render_text.cc index de33f9380..b0a958c16 100644 --- a/src/lib/render_text.cc +++ b/src/lib/render_text.cc @@ -24,10 +24,13 @@ #include "cross.h" #include "font.h" #include "dcpomatic_assert.h" +#include "warnings.h" #include #include #include +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include #ifndef DCPOMATIC_HAVE_SHOW_IN_CAIRO_CONTEXT #include diff --git a/src/lib/util.cc b/src/lib/util.cc index 91a8ecb6e..b6ca34d22 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -66,7 +66,9 @@ extern "C" { #include #include #include +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #ifdef DCPOMATIC_WINDOWS #include #include diff --git a/src/lib/wscript b/src/lib/wscript index c2dfb55d8..0c9cddfa4 100644 --- a/src/lib/wscript +++ b/src/lib/wscript @@ -206,7 +206,7 @@ def build(bld): """ if bld.env.TARGET_OSX: - obj.framework = ['IOKit', 'Foundation', 'DiskArbitration'] + obj.framework = ['IOKit', 'Foundation', 'DiskArbitration', 'ApplicationServices'] obj.source = sources + ' version.cc' diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index 9cd99a265..75b4025aa 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -98,9 +98,6 @@ #ifdef __WXMSW__ #include #endif -#ifdef __WXOSX__ -#include -#endif #include #include #include @@ -1548,10 +1545,9 @@ private: unsetenv ("UBUNTU_MENUPROXY"); #endif -#ifdef __WXOSX__ - ProcessSerialNumber serial; - GetCurrentProcess (&serial); - TransformProcessType (&serial, kProcessTransformToForegroundApplication); +#ifdef DCPOMATIC_OSX + dcpomatic_sleep_seconds (1); + make_foreground_application (); #endif dcpomatic_setup_path_encoding (); diff --git a/src/tools/dcpomatic_disk.cc b/src/tools/dcpomatic_disk.cc index 6d8727303..55f2bd440 100644 --- a/src/tools/dcpomatic_disk.cc +++ b/src/tools/dcpomatic_disk.cc @@ -41,7 +41,6 @@ #include #endif #ifdef DCPOMATIC_OSX -#include #include #endif @@ -317,10 +316,8 @@ public: unsetenv ("UBUNTU_MENUPROXY"); #endif -#ifdef __WXOSX__ - ProcessSerialNumber serial; - GetCurrentProcess (&serial); - TransformProcessType (&serial, kProcessTransformToForegroundApplication); +#ifdef DCPOMATIC_OSX + make_foreground_application (); #endif dcpomatic_setup_path_encoding (); diff --git a/src/tools/dcpomatic_disk_writer.cc b/src/tools/dcpomatic_disk_writer.cc index 66d38ec19..1e6d10fbf 100644 --- a/src/tools/dcpomatic_disk_writer.cc +++ b/src/tools/dcpomatic_disk_writer.cc @@ -27,6 +27,7 @@ #include "lib/file_log.h" #include "lib/dcpomatic_log.h" #include "lib/nanomsg.h" +#include "lib/warnings.h" extern "C" { #include #include @@ -66,7 +67,10 @@ extern "C" { } #endif +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS + #include #include #include diff --git a/src/tools/dcpomatic_kdm.cc b/src/tools/dcpomatic_kdm.cc index 117e756c7..84573797e 100644 --- a/src/tools/dcpomatic_kdm.cc +++ b/src/tools/dcpomatic_kdm.cc @@ -718,10 +718,8 @@ private: unsetenv ("UBUNTU_MENUPROXY"); #endif -#ifdef __WXOSX__ - ProcessSerialNumber serial; - GetCurrentProcess (&serial); - TransformProcessType (&serial, kProcessTransformToForegroundApplication); +#ifdef DCPOMATIC_OSX + make_foreground_application (); #endif dcpomatic_setup_path_encoding (); diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index 67a06aec4..17f652625 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -73,9 +73,6 @@ #ifdef __WXGTK__ #include #endif -#ifdef __WXOSX__ -#include -#endif #include #include #include @@ -1156,10 +1153,8 @@ private: unsetenv ("UBUNTU_MENUPROXY"); #endif -#ifdef __WXOSX__ - ProcessSerialNumber serial; - GetCurrentProcess (&serial); - TransformProcessType (&serial, kProcessTransformToForegroundApplication); +#ifdef DCPOMATIC_OSX + make_foreground_application (); #endif dcpomatic_setup_path_encoding (); diff --git a/src/tools/dcpomatic_playlist.cc b/src/tools/dcpomatic_playlist.cc index 04950028a..b2b5c458a 100644 --- a/src/tools/dcpomatic_playlist.cc +++ b/src/tools/dcpomatic_playlist.cc @@ -36,9 +36,6 @@ #include #include #include -#ifdef __WXOSX__ -#include -#endif #include using std::exception; @@ -585,10 +582,8 @@ private: unsetenv ("UBUNTU_MENUPROXY"); #endif -#ifdef __WXOSX__ - ProcessSerialNumber serial; - GetCurrentProcess (&serial); - TransformProcessType (&serial, kProcessTransformToForegroundApplication); +#ifdef DCPOMATIC_OSX + make_foreground_application (); #endif dcpomatic_setup_path_encoding (); diff --git a/src/wx/gl_video_view.cc b/src/wx/gl_video_view.cc index 786cee84a..a87249faf 100644 --- a/src/wx/gl_video_view.cc +++ b/src/wx/gl_video_view.cc @@ -180,7 +180,9 @@ GLVideoView::draw (Position inter_position, dcp::Size inter_size) glMatrixMode (GL_PROJECTION); glLoadIdentity (); +DCPOMATIC_DISABLE_WARNINGS gluOrtho2D (0, canvas_size.GetWidth(), canvas_size.GetHeight(), 0); +DCPOMATIC_ENABLE_WARNINGS check_gl_error ("gluOrtho2d"); glMatrixMode (GL_MODELVIEW); glLoadIdentity (); diff --git a/wscript b/wscript index b0faa8483..b1e2096d4 100644 --- a/wscript +++ b/wscript @@ -322,7 +322,7 @@ def configure(conf): if conf.options.workaround_gssapi: conf.env.LIB_SSH = ['gssapi_krb5'] else: - conf.check_cc(fragment=""" + conf.check_cxx(fragment=""" #include \n int main () {\n ssh_new ();\n @@ -501,7 +501,7 @@ def configure(conf): conf.check_cxx(fragment=""" #include \n - int main() { boost::thread t (); }\n + int main() { boost::thread t; }\n """, msg='Checking for boost threading library', libpath='/usr/local/lib', -- cgit v1.2.3 From c622a06189181a3a6ad356094c9a3cf4e1f5a722 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 27 Jul 2020 01:35:57 +0200 Subject: Hide warnings triggered by Ubuntu 20.04's gcc. --- src/lib/warnings.h | 1 + src/tools/dcpomatic.cc | 3 +++ src/tools/dcpomatic_kdm.cc | 3 +++ src/tools/dcpomatic_server.cc | 3 +++ src/wx/about_dialog.cc | 3 +++ src/wx/about_dialog.h | 3 +++ src/wx/audio_dialog.h | 3 +++ src/wx/audio_mapping_view.cc | 3 +++ src/wx/audio_mapping_view.h | 7 +++++-- src/wx/audio_plot.h | 3 +++ src/wx/closed_captions_dialog.h | 3 +++ src/wx/config_dialog.h | 3 +++ src/wx/content_advanced_dialog.h | 3 +++ src/wx/content_sub_panel.h | 7 +++++-- src/wx/content_view.h | 3 +++ src/wx/controls.h | 3 +++ src/wx/custom_scale_dialog.cc | 3 +++ src/wx/custom_scale_dialog.h | 3 +++ src/wx/dir_picker_ctrl.cc | 3 +++ src/wx/disk_warning_dialog.h | 3 +++ src/wx/dkdm_output_panel.cc | 3 +++ src/wx/download_certificate_dialog.h | 3 +++ src/wx/export_dialog.cc | 3 +++ src/wx/file_picker_ctrl.cc | 3 +++ src/wx/film_editor.h | 3 +++ src/wx/film_name_location_dialog.h | 7 +++++-- src/wx/film_viewer.h | 3 +++ src/wx/filter_dialog.h | 3 +++ src/wx/focus_manager.cc | 3 +++ src/wx/fonts_dialog.h | 3 +++ src/wx/gl_video_view.h | 5 ++++- src/wx/hints_dialog.cc | 3 +++ src/wx/hints_dialog.h | 3 +++ src/wx/html_dialog.cc | 3 +++ src/wx/html_dialog.h | 3 +++ src/wx/initial_setup_dialog.h | 3 +++ src/wx/instant_i18n_dialog.h | 3 +++ src/wx/job_manager_view.h | 3 +++ src/wx/kdm_cpl_panel.h | 3 +++ src/wx/kdm_output_panel.cc | 11 ++++++++--- src/wx/kdm_timing_panel.cc | 3 +++ src/wx/kdm_timing_panel.h | 3 +++ src/wx/markers_dialog.h | 3 +++ src/wx/nag_dialog.h | 3 +++ src/wx/name_format_editor.h | 3 +++ src/wx/password_entry.h | 3 +++ src/wx/player_information.h | 3 +++ src/wx/player_stress_tester.h | 3 +++ src/wx/question_dialog.h | 3 +++ src/wx/recipient_dialog.cc | 3 +++ src/wx/recipients_panel.h | 3 +++ src/wx/repeat_dialog.h | 3 +++ src/wx/report_problem_dialog.h | 3 +++ src/wx/rgba_colour_picker.cc | 3 +++ src/wx/rgba_colour_picker.h | 3 +++ src/wx/screen_dialog.cc | 3 +++ src/wx/screens_panel.h | 3 +++ src/wx/self_dkdm_dialog.cc | 5 +++++ src/wx/self_dkdm_dialog.h | 3 +++ src/wx/servers_list_dialog.h | 3 +++ src/wx/simple_video_view.h | 3 +++ src/wx/subtitle_appearance_dialog.cc | 3 +++ src/wx/subtitle_appearance_dialog.h | 3 +++ src/wx/system_font_dialog.h | 3 +++ src/wx/templates_dialog.h | 3 +++ src/wx/text_view.h | 3 +++ src/wx/time_picker.h | 3 +++ src/wx/timeline_content_view.h | 3 +++ src/wx/try_unmount_dialog.h | 3 +++ src/wx/update_dialog.cc | 3 +++ src/wx/update_dialog.h | 3 +++ src/wx/verify_dcp_dialog.cc | 3 +++ src/wx/verify_dcp_dialog.h | 3 +++ src/wx/video_waveform_dialog.h | 3 +++ src/wx/video_waveform_plot.h | 3 +++ src/wx/wx_signal_manager.cc | 5 ++++- src/wx/wx_util.cc | 3 +++ 77 files changed, 244 insertions(+), 11 deletions(-) (limited to 'src/tools') diff --git a/src/lib/warnings.h b/src/lib/warnings.h index 4414755f5..f55f657bf 100644 --- a/src/lib/warnings.h +++ b/src/lib/warnings.h @@ -22,6 +22,7 @@ _Pragma("GCC diagnostic push") \ _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \ _Pragma("GCC diagnostic ignored \"-Wmissing-field-initializers\"") \ + _Pragma("GCC diagnostic ignored \"-Wdeprecated-copy\"") \ _Pragma("GCC diagnostic ignored \"-Wunused-parameter\"") #define DCPOMATIC_ENABLE_WARNINGS \ diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index 75b4025aa..3680e2802 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -84,14 +84,17 @@ #include "lib/text_content.h" #include "lib/dcpomatic_log.h" #include "lib/subtitle_encoder.h" +#include "lib/warnings.h" #include #include +DCPOMATIC_DISABLE_WARNINGS #include #include #include #include #include #include +DCPOMATIC_ENABLE_WARNINGS #ifdef __WXGTK__ #include #endif diff --git a/src/tools/dcpomatic_kdm.cc b/src/tools/dcpomatic_kdm.cc index 84573797e..1d623abcd 100644 --- a/src/tools/dcpomatic_kdm.cc +++ b/src/tools/dcpomatic_kdm.cc @@ -51,10 +51,13 @@ #include #include #include +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include #include #include #include +DCPOMATIC_ENABLE_WARNINGS #ifdef __WXOSX__ #include #endif diff --git a/src/tools/dcpomatic_server.cc b/src/tools/dcpomatic_server.cc index cb4779ee3..a4ef0bc62 100644 --- a/src/tools/dcpomatic_server.cc +++ b/src/tools/dcpomatic_server.cc @@ -29,9 +29,12 @@ #include "lib/signaller.h" #include "lib/cross.h" #include "lib/dcpomatic_log.h" +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include #include #include +DCPOMATIC_ENABLE_WARNINGS #include #include #include diff --git a/src/wx/about_dialog.cc b/src/wx/about_dialog.cc index 4f58b2d18..b3e68f4d1 100644 --- a/src/wx/about_dialog.cc +++ b/src/wx/about_dialog.cc @@ -27,8 +27,11 @@ #include "static_text.h" #include "lib/version.h" #include "lib/compose.hpp" +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include #include +DCPOMATIC_ENABLE_WARNINGS using std::vector; diff --git a/src/wx/about_dialog.h b/src/wx/about_dialog.h index c19654599..f3bb65a6c 100644 --- a/src/wx/about_dialog.h +++ b/src/wx/about_dialog.h @@ -22,7 +22,10 @@ * @brief The "about DCP-o-matic" dialogue box. */ +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS class wxNotebook; diff --git a/src/wx/audio_dialog.h b/src/wx/audio_dialog.h index 93c33152a..e5625d415 100644 --- a/src/wx/audio_dialog.h +++ b/src/wx/audio_dialog.h @@ -21,7 +21,10 @@ #include "lib/film.h" #include "lib/audio_analysis.h" #include "lib/playlist.h" +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include #include diff --git a/src/wx/audio_mapping_view.cc b/src/wx/audio_mapping_view.cc index 9e3ff787d..e1c96fdeb 100644 --- a/src/wx/audio_mapping_view.cc +++ b/src/wx/audio_mapping_view.cc @@ -27,12 +27,15 @@ #include "audio_gain_dialog.h" #include "lib/audio_mapping.h" #include "lib/util.h" +#include "lib/warnings.h" #include #include +DCPOMATIC_DISABLE_WARNINGS #include #include #include #include +DCPOMATIC_ENABLE_WARNINGS #include #include diff --git a/src/wx/audio_mapping_view.h b/src/wx/audio_mapping_view.h index 3057416b2..e20e5289b 100644 --- a/src/wx/audio_mapping_view.h +++ b/src/wx/audio_mapping_view.h @@ -23,9 +23,12 @@ * */ -#include -#include #include "lib/audio_mapping.h" +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS +#include +DCPOMATIC_ENABLE_WARNINGS +#include /** @class AudioMappingView * @brief This class displays the mapping of one set of audio channels to another, diff --git a/src/wx/audio_plot.h b/src/wx/audio_plot.h index 6eb853dce..989f15edc 100644 --- a/src/wx/audio_plot.h +++ b/src/wx/audio_plot.h @@ -20,7 +20,10 @@ #include "lib/util.h" #include "lib/audio_analysis.h" +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include #include #include diff --git a/src/wx/closed_captions_dialog.h b/src/wx/closed_captions_dialog.h index 5c366ca7b..cfdab5f3c 100644 --- a/src/wx/closed_captions_dialog.h +++ b/src/wx/closed_captions_dialog.h @@ -21,7 +21,10 @@ #include "lib/dcpomatic_time.h" #include "lib/player.h" #include "lib/text_ring_buffers.h" +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS class Butler; class FilmViewer; diff --git a/src/wx/config_dialog.h b/src/wx/config_dialog.h index f47408a4f..afbe9ed2e 100644 --- a/src/wx/config_dialog.h +++ b/src/wx/config_dialog.h @@ -32,13 +32,16 @@ #include "lib/util.h" #include "lib/cross.h" #include "lib/exceptions.h" +#include "lib/warnings.h" #include #include #include +DCPOMATIC_DISABLE_WARNINGS #include #include #include #include +DCPOMATIC_ENABLE_WARNINGS #include #include #include diff --git a/src/wx/content_advanced_dialog.h b/src/wx/content_advanced_dialog.h index ba5d0c6fd..b8c12d7b2 100644 --- a/src/wx/content_advanced_dialog.h +++ b/src/wx/content_advanced_dialog.h @@ -19,7 +19,10 @@ */ +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include #include diff --git a/src/wx/content_sub_panel.h b/src/wx/content_sub_panel.h index d5f502eea..128a3862d 100644 --- a/src/wx/content_sub_panel.h +++ b/src/wx/content_sub_panel.h @@ -21,10 +21,13 @@ #ifndef DCPOMATIC_CONTENT_SUB_PANEL_H #define DCPOMATIC_CONTENT_SUB_PANEL_H -#include -#include #include "lib/film.h" #include "lib/config.h" +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS +#include +DCPOMATIC_ENABLE_WARNINGS +#include class ContentPanel; class Content; diff --git a/src/wx/content_view.h b/src/wx/content_view.h index 334e9bb68..3f4a65ab1 100644 --- a/src/wx/content_view.h +++ b/src/wx/content_view.h @@ -19,7 +19,10 @@ */ #include "lib/content_store.h" +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include #include #include diff --git a/src/wx/controls.h b/src/wx/controls.h index b9c4604b6..1d6273af6 100644 --- a/src/wx/controls.h +++ b/src/wx/controls.h @@ -24,7 +24,10 @@ #include "lib/dcpomatic_time.h" #include "lib/types.h" #include "lib/film.h" +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include #include diff --git a/src/wx/custom_scale_dialog.cc b/src/wx/custom_scale_dialog.cc index 3452d5765..bb8be8e80 100644 --- a/src/wx/custom_scale_dialog.cc +++ b/src/wx/custom_scale_dialog.cc @@ -23,9 +23,12 @@ #include "wx_util.h" #include "lib/util.h" #include +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include #include #include +DCPOMATIC_ENABLE_WARNINGS using boost::optional; diff --git a/src/wx/custom_scale_dialog.h b/src/wx/custom_scale_dialog.h index 4c9ccf388..485b6acf5 100644 --- a/src/wx/custom_scale_dialog.h +++ b/src/wx/custom_scale_dialog.h @@ -19,10 +19,13 @@ */ +#include "lib/warnings.h" #include "table_dialog.h" #include +DCPOMATIC_DISABLE_WARNINGS #include #include +DCPOMATIC_ENABLE_WARNINGS class CustomScaleDialog : public TableDialog diff --git a/src/wx/dir_picker_ctrl.cc b/src/wx/dir_picker_ctrl.cc index b05e73273..289316820 100644 --- a/src/wx/dir_picker_ctrl.cc +++ b/src/wx/dir_picker_ctrl.cc @@ -22,9 +22,12 @@ #include "wx_util.h" #include "static_text.h" #include "dcpomatic_button.h" +#include "lib/warnings.h" #include #include +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include using namespace std; diff --git a/src/wx/disk_warning_dialog.h b/src/wx/disk_warning_dialog.h index 869092faa..c690ea25d 100644 --- a/src/wx/disk_warning_dialog.h +++ b/src/wx/disk_warning_dialog.h @@ -18,7 +18,10 @@ */ +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS class DiskWarningDialog : public wxDialog { diff --git a/src/wx/dkdm_output_panel.cc b/src/wx/dkdm_output_panel.cc index 3f8730ae3..d8645ff97 100644 --- a/src/wx/dkdm_output_panel.cc +++ b/src/wx/dkdm_output_panel.cc @@ -20,6 +20,7 @@ #include "lib/config.h" #include "lib/send_kdm_email_job.h" +#include "lib/warnings.h" #include "dkdm_output_panel.h" #include "kdm_timing_panel.h" #include "confirm_kdm_email_dialog.h" @@ -32,7 +33,9 @@ #ifdef DCPOMATIC_USE_OWN_PICKER #include "dir_picker_ctrl.h" #else +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #endif #include diff --git a/src/wx/download_certificate_dialog.h b/src/wx/download_certificate_dialog.h index a2fbf808f..ef241a0ca 100644 --- a/src/wx/download_certificate_dialog.h +++ b/src/wx/download_certificate_dialog.h @@ -18,9 +18,12 @@ */ +#include "lib/warnings.h" #include +DCPOMATIC_DISABLE_WARNINGS #include #include +DCPOMATIC_ENABLE_WARNINGS class DownloadCertificatePanel; diff --git a/src/wx/export_dialog.cc b/src/wx/export_dialog.cc index ce6e1e2e9..fa627cd81 100644 --- a/src/wx/export_dialog.cc +++ b/src/wx/export_dialog.cc @@ -22,7 +22,10 @@ #include "file_picker_ctrl.h" #include "wx_util.h" #include "check_box.h" +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include using std::string; diff --git a/src/wx/file_picker_ctrl.cc b/src/wx/file_picker_ctrl.cc index 47211a269..3eb05e44d 100644 --- a/src/wx/file_picker_ctrl.cc +++ b/src/wx/file_picker_ctrl.cc @@ -21,9 +21,12 @@ #include "file_picker_ctrl.h" #include "wx_util.h" #include "dcpomatic_button.h" +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include #include #include +DCPOMATIC_ENABLE_WARNINGS #include using namespace std; diff --git a/src/wx/film_editor.h b/src/wx/film_editor.h index b8d862f81..84a1d361b 100644 --- a/src/wx/film_editor.h +++ b/src/wx/film_editor.h @@ -23,7 +23,10 @@ */ #include "lib/film.h" +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include class wxNotebook; diff --git a/src/wx/film_name_location_dialog.h b/src/wx/film_name_location_dialog.h index cfa296701..f2f082680 100644 --- a/src/wx/film_name_location_dialog.h +++ b/src/wx/film_name_location_dialog.h @@ -18,10 +18,13 @@ */ -#include -#include #include "wx_util.h" #include "table_dialog.h" +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS +#include +#include +DCPOMATIC_ENABLE_WARNINGS class DirPickerCtrl; diff --git a/src/wx/film_viewer.h b/src/wx/film_viewer.h index 29985a581..6e995813c 100644 --- a/src/wx/film_viewer.h +++ b/src/wx/film_viewer.h @@ -28,8 +28,11 @@ #include "lib/player_text.h" #include "lib/timer.h" #include "lib/signaller.h" +#include "lib/warnings.h" #include +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS class wxToggleButton; class FFmpegPlayer; diff --git a/src/wx/filter_dialog.h b/src/wx/filter_dialog.h index 3ba4a09f5..775995f38 100644 --- a/src/wx/filter_dialog.h +++ b/src/wx/filter_dialog.h @@ -22,7 +22,10 @@ * @brief A dialog to select FFmpeg filters. */ +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include class Film; diff --git a/src/wx/focus_manager.cc b/src/wx/focus_manager.cc index f4f23cb28..e10075f3a 100644 --- a/src/wx/focus_manager.cc +++ b/src/wx/focus_manager.cc @@ -19,7 +19,10 @@ */ #include "focus_manager.h" +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS FocusManager* FocusManager::_instance; diff --git a/src/wx/fonts_dialog.h b/src/wx/fonts_dialog.h index ba98e0963..260e74c3d 100644 --- a/src/wx/fonts_dialog.h +++ b/src/wx/fonts_dialog.h @@ -18,8 +18,11 @@ */ +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include #include +DCPOMATIC_ENABLE_WARNINGS #include #include #include diff --git a/src/wx/gl_video_view.h b/src/wx/gl_video_view.h index 3675b8ddc..fcf5dbcf2 100644 --- a/src/wx/gl_video_view.h +++ b/src/wx/gl_video_view.h @@ -21,8 +21,11 @@ #include "video_view.h" #include "lib/signaller.h" #include "lib/position.h" -#include +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +#include +DCPOMATIC_ENABLE_WARNINGS #include #include #include diff --git a/src/wx/hints_dialog.cc b/src/wx/hints_dialog.cc index cb0de450a..c98cbae07 100644 --- a/src/wx/hints_dialog.cc +++ b/src/wx/hints_dialog.cc @@ -25,7 +25,10 @@ #include "lib/film.h" #include "lib/hints.h" #include "lib/config.h" +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include using std::max; diff --git a/src/wx/hints_dialog.h b/src/wx/hints_dialog.h index 1fac9d11e..87dcf1953 100644 --- a/src/wx/hints_dialog.h +++ b/src/wx/hints_dialog.h @@ -19,7 +19,10 @@ */ #include "lib/types.h" +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include #include diff --git a/src/wx/html_dialog.cc b/src/wx/html_dialog.cc index b5f86e7a1..873aa718c 100644 --- a/src/wx/html_dialog.cc +++ b/src/wx/html_dialog.cc @@ -21,9 +21,12 @@ #include "html_dialog.h" #include "wx_util.h" #include "lib/cross.h" +#include "lib/warnings.h" #include +DCPOMATIC_DISABLE_WARNINGS #include #include +DCPOMATIC_ENABLE_WARNINGS #include HTMLDialog::HTMLDialog (wxWindow* parent, wxString title, wxString html) diff --git a/src/wx/html_dialog.h b/src/wx/html_dialog.h index f5fc76e4f..9da4c8215 100644 --- a/src/wx/html_dialog.h +++ b/src/wx/html_dialog.h @@ -18,7 +18,10 @@ */ +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS class wxHtmlLinkEvent; diff --git a/src/wx/initial_setup_dialog.h b/src/wx/initial_setup_dialog.h index 3dfdbe2b0..2198fb426 100644 --- a/src/wx/initial_setup_dialog.h +++ b/src/wx/initial_setup_dialog.h @@ -18,7 +18,10 @@ */ +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS class InitialSetupDialog : public wxDialog { diff --git a/src/wx/instant_i18n_dialog.h b/src/wx/instant_i18n_dialog.h index f9fe96d6a..418a1145d 100644 --- a/src/wx/instant_i18n_dialog.h +++ b/src/wx/instant_i18n_dialog.h @@ -18,7 +18,10 @@ */ +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS class InstantI18NDialog : public wxDialog { diff --git a/src/wx/job_manager_view.h b/src/wx/job_manager_view.h index 77114a97c..2e471532f 100644 --- a/src/wx/job_manager_view.h +++ b/src/wx/job_manager_view.h @@ -22,7 +22,10 @@ * @brief Class which is a wxPanel for showing the progress of jobs. */ +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include #include diff --git a/src/wx/kdm_cpl_panel.h b/src/wx/kdm_cpl_panel.h index 9d6db76c6..4b461b813 100644 --- a/src/wx/kdm_cpl_panel.h +++ b/src/wx/kdm_cpl_panel.h @@ -19,8 +19,11 @@ */ #include "lib/types.h" +#include "lib/warnings.h" #include +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS class KDMCPLPanel : public wxPanel { diff --git a/src/wx/kdm_output_panel.cc b/src/wx/kdm_output_panel.cc index a345d0e96..b138e7d31 100644 --- a/src/wx/kdm_output_panel.cc +++ b/src/wx/kdm_output_panel.cc @@ -18,9 +18,6 @@ */ -#include "lib/config.h" -#include "lib/cinema.h" -#include "lib/send_kdm_email_job.h" #include "kdm_output_panel.h" #include "kdm_timing_panel.h" #include "confirm_kdm_email_dialog.h" @@ -29,14 +26,22 @@ #include "name_format_editor.h" #include "check_box.h" #include "dcpomatic_button.h" +#include "lib/config.h" +#include "lib/cinema.h" +#include "lib/send_kdm_email_job.h" +#include "lib/warnings.h" #include #include #ifdef DCPOMATIC_USE_OWN_PICKER #include "dir_picker_ctrl.h" #else +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #endif +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS using std::pair; using std::string; diff --git a/src/wx/kdm_timing_panel.cc b/src/wx/kdm_timing_panel.cc index 51a99627c..2734a9894 100644 --- a/src/wx/kdm_timing_panel.cc +++ b/src/wx/kdm_timing_panel.cc @@ -22,8 +22,11 @@ #include "wx_util.h" #include "time_picker.h" #include "static_text.h" +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include #include +DCPOMATIC_ENABLE_WARNINGS using std::cout; using boost::bind; diff --git a/src/wx/kdm_timing_panel.h b/src/wx/kdm_timing_panel.h index a926864db..be2e9309b 100644 --- a/src/wx/kdm_timing_panel.h +++ b/src/wx/kdm_timing_panel.h @@ -18,7 +18,10 @@ */ +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include #include diff --git a/src/wx/markers_dialog.h b/src/wx/markers_dialog.h index fbbaa1aee..e2c261873 100644 --- a/src/wx/markers_dialog.h +++ b/src/wx/markers_dialog.h @@ -18,7 +18,10 @@ */ +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include #include #include diff --git a/src/wx/nag_dialog.h b/src/wx/nag_dialog.h index acf20f129..bc5ae6962 100644 --- a/src/wx/nag_dialog.h +++ b/src/wx/nag_dialog.h @@ -19,7 +19,10 @@ */ #include "lib/config.h" +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS class NagDialog : public wxDialog { diff --git a/src/wx/name_format_editor.h b/src/wx/name_format_editor.h index 2ae3f5e93..32c78ea25 100644 --- a/src/wx/name_format_editor.h +++ b/src/wx/name_format_editor.h @@ -22,8 +22,11 @@ #define DCPOMATIC_NAME_FORMAT_EDITOR_H #include "lib/compose.hpp" +#include "lib/warnings.h" #include +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include #include diff --git a/src/wx/password_entry.h b/src/wx/password_entry.h index b7cc93319..5939e5264 100644 --- a/src/wx/password_entry.h +++ b/src/wx/password_entry.h @@ -18,7 +18,10 @@ */ +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include class CheckBox; diff --git a/src/wx/player_information.h b/src/wx/player_information.h index b93228174..ae3e13429 100644 --- a/src/wx/player_information.h +++ b/src/wx/player_information.h @@ -18,7 +18,10 @@ */ +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include #include diff --git a/src/wx/player_stress_tester.h b/src/wx/player_stress_tester.h index 9da73762f..c8cc14676 100644 --- a/src/wx/player_stress_tester.h +++ b/src/wx/player_stress_tester.h @@ -18,7 +18,10 @@ */ +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include #include diff --git a/src/wx/question_dialog.h b/src/wx/question_dialog.h index a3b05173a..6b99065f6 100644 --- a/src/wx/question_dialog.h +++ b/src/wx/question_dialog.h @@ -18,7 +18,10 @@ */ +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS class QuestionDialog : public wxDialog { diff --git a/src/wx/recipient_dialog.cc b/src/wx/recipient_dialog.cc index 94d5e3deb..f0bb54708 100644 --- a/src/wx/recipient_dialog.cc +++ b/src/wx/recipient_dialog.cc @@ -29,8 +29,11 @@ #include "lib/util.h" #include #include +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include #include +DCPOMATIC_ENABLE_WARNINGS #include using std::string; diff --git a/src/wx/recipients_panel.h b/src/wx/recipients_panel.h index 15c043f1a..b33b7ebc8 100644 --- a/src/wx/recipients_panel.h +++ b/src/wx/recipients_panel.h @@ -19,9 +19,12 @@ */ #include "lib/dkdm_recipient.h" +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include #include #include +DCPOMATIC_ENABLE_WARNINGS #include #include #include diff --git a/src/wx/repeat_dialog.h b/src/wx/repeat_dialog.h index 0c4fb6a86..d3f1d32f8 100644 --- a/src/wx/repeat_dialog.h +++ b/src/wx/repeat_dialog.h @@ -18,8 +18,11 @@ */ +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include #include +DCPOMATIC_ENABLE_WARNINGS #include "table_dialog.h" class RepeatDialog : public TableDialog diff --git a/src/wx/report_problem_dialog.h b/src/wx/report_problem_dialog.h index 9bd70a50e..651087907 100644 --- a/src/wx/report_problem_dialog.h +++ b/src/wx/report_problem_dialog.h @@ -18,7 +18,10 @@ */ +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include class wxTextCtrl; diff --git a/src/wx/rgba_colour_picker.cc b/src/wx/rgba_colour_picker.cc index 6ea3571a1..731cf9539 100644 --- a/src/wx/rgba_colour_picker.cc +++ b/src/wx/rgba_colour_picker.cc @@ -21,7 +21,10 @@ #include "rgba_colour_picker.h" #include "wx_util.h" #include "static_text.h" +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS RGBAColourPicker::RGBAColourPicker (wxWindow* parent, RGBA colour) : wxPanel (parent, wxID_ANY) diff --git a/src/wx/rgba_colour_picker.h b/src/wx/rgba_colour_picker.h index c7972d4b3..30c81b103 100644 --- a/src/wx/rgba_colour_picker.h +++ b/src/wx/rgba_colour_picker.h @@ -19,7 +19,10 @@ */ #include "lib/rgba.h" +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS class wxColourPickerCtrl; class wxSlider; diff --git a/src/wx/screen_dialog.cc b/src/wx/screen_dialog.cc index 71d0ed99d..bc7065f29 100644 --- a/src/wx/screen_dialog.cc +++ b/src/wx/screen_dialog.cc @@ -27,10 +27,13 @@ #include "dcpomatic_button.h" #include "lib/compose.hpp" #include "lib/util.h" +#include "lib/warnings.h" #include #include +DCPOMATIC_DISABLE_WARNINGS #include #include +DCPOMATIC_ENABLE_WARNINGS #include using std::string; diff --git a/src/wx/screens_panel.h b/src/wx/screens_panel.h index 510297efb..9cf317c5a 100644 --- a/src/wx/screens_panel.h +++ b/src/wx/screens_panel.h @@ -18,7 +18,10 @@ */ +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include #include #include diff --git a/src/wx/self_dkdm_dialog.cc b/src/wx/self_dkdm_dialog.cc index 5eae05de4..4c10c8f6b 100644 --- a/src/wx/self_dkdm_dialog.cc +++ b/src/wx/self_dkdm_dialog.cc @@ -26,15 +26,20 @@ #include "lib/film.h" #include "lib/screen.h" #include "lib/config.h" +#include "lib/warnings.h" #include #ifdef DCPOMATIC_USE_OWN_PICKER #include "dir_picker_ctrl.h" #else +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #endif +DCPOMATIC_DISABLE_WARNINGS #include #include #include +DCPOMATIC_ENABLE_WARNINGS #include using std::string; diff --git a/src/wx/self_dkdm_dialog.h b/src/wx/self_dkdm_dialog.h index 509280b5c..f49749a69 100644 --- a/src/wx/self_dkdm_dialog.h +++ b/src/wx/self_dkdm_dialog.h @@ -19,8 +19,11 @@ */ #include "wx_util.h" +#include "lib/warnings.h" #include +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include #include #include diff --git a/src/wx/servers_list_dialog.h b/src/wx/servers_list_dialog.h index 309cde77e..dc261ff1c 100644 --- a/src/wx/servers_list_dialog.h +++ b/src/wx/servers_list_dialog.h @@ -19,8 +19,11 @@ */ #include "lib/encode_server.h" +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include #include +DCPOMATIC_ENABLE_WARNINGS #include class ServersListDialog : public wxDialog diff --git a/src/wx/simple_video_view.h b/src/wx/simple_video_view.h index 643c782b8..323047ada 100644 --- a/src/wx/simple_video_view.h +++ b/src/wx/simple_video_view.h @@ -20,8 +20,11 @@ #include "video_view.h" #include "lib/position.h" +#include "lib/warnings.h" #include +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS class FilmViewer; diff --git a/src/wx/subtitle_appearance_dialog.cc b/src/wx/subtitle_appearance_dialog.cc index 76e8d8b16..6d905292e 100644 --- a/src/wx/subtitle_appearance_dialog.cc +++ b/src/wx/subtitle_appearance_dialog.cc @@ -29,10 +29,13 @@ #include "lib/ffmpeg_content.h" #include "lib/examine_ffmpeg_subtitles_job.h" #include "lib/job_manager.h" +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include #include #include #include +DCPOMATIC_ENABLE_WARNINGS using std::map; using std::string; diff --git a/src/wx/subtitle_appearance_dialog.h b/src/wx/subtitle_appearance_dialog.h index 6c7e46817..b0dd8d307 100644 --- a/src/wx/subtitle_appearance_dialog.h +++ b/src/wx/subtitle_appearance_dialog.h @@ -20,7 +20,10 @@ #include "timecode.h" #include "lib/rgba.h" +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include #include diff --git a/src/wx/system_font_dialog.h b/src/wx/system_font_dialog.h index 48a31a839..da51c9c3a 100644 --- a/src/wx/system_font_dialog.h +++ b/src/wx/system_font_dialog.h @@ -26,7 +26,10 @@ * one of those fonts. */ +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include #include #include diff --git a/src/wx/templates_dialog.h b/src/wx/templates_dialog.h index 8ef0d956c..4a55e0beb 100644 --- a/src/wx/templates_dialog.h +++ b/src/wx/templates_dialog.h @@ -18,8 +18,11 @@ */ +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include #include +DCPOMATIC_ENABLE_WARNINGS #include class TemplatesDialog : public wxDialog diff --git a/src/wx/text_view.h b/src/wx/text_view.h index 6ce22dc79..d360838a8 100644 --- a/src/wx/text_view.h +++ b/src/wx/text_view.h @@ -19,7 +19,10 @@ */ #include "lib/content_text.h" +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include #include #include diff --git a/src/wx/time_picker.h b/src/wx/time_picker.h index 9e83c0043..53b0ce2b8 100644 --- a/src/wx/time_picker.h +++ b/src/wx/time_picker.h @@ -18,7 +18,10 @@ */ +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include class wxSpinCtrl; diff --git a/src/wx/timeline_content_view.h b/src/wx/timeline_content_view.h index 27cfed53e..2573e3cb3 100644 --- a/src/wx/timeline_content_view.h +++ b/src/wx/timeline_content_view.h @@ -22,8 +22,11 @@ #define DCPOMATIC_TIMELINE_CONTENT_VIEW_H #include "lib/types.h" +#include "lib/warnings.h" #include "timeline_view.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include class Content; diff --git a/src/wx/try_unmount_dialog.h b/src/wx/try_unmount_dialog.h index 9ae7de933..de686f14c 100644 --- a/src/wx/try_unmount_dialog.h +++ b/src/wx/try_unmount_dialog.h @@ -18,7 +18,10 @@ */ +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS class TryUnmountDialog : public wxDialog { diff --git a/src/wx/update_dialog.cc b/src/wx/update_dialog.cc index e864564ac..373e518b1 100644 --- a/src/wx/update_dialog.cc +++ b/src/wx/update_dialog.cc @@ -21,7 +21,10 @@ #include "update_dialog.h" #include "static_text.h" #include "wx_util.h" +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS using std::string; using boost::optional; diff --git a/src/wx/update_dialog.h b/src/wx/update_dialog.h index 2db12ab64..096699f39 100644 --- a/src/wx/update_dialog.h +++ b/src/wx/update_dialog.h @@ -18,7 +18,10 @@ */ +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include class UpdateDialog : public wxDialog diff --git a/src/wx/verify_dcp_dialog.cc b/src/wx/verify_dcp_dialog.cc index 42728614f..6432d21c7 100644 --- a/src/wx/verify_dcp_dialog.cc +++ b/src/wx/verify_dcp_dialog.cc @@ -21,8 +21,11 @@ #include "verify_dcp_dialog.h" #include "wx_util.h" #include "lib/verify_dcp_job.h" +#include "lib/warnings.h" #include +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include using std::list; diff --git a/src/wx/verify_dcp_dialog.h b/src/wx/verify_dcp_dialog.h index d2f21863d..b67c1dfc7 100644 --- a/src/wx/verify_dcp_dialog.h +++ b/src/wx/verify_dcp_dialog.h @@ -19,7 +19,10 @@ */ #include +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include class wxRichTextCtrl; diff --git a/src/wx/video_waveform_dialog.h b/src/wx/video_waveform_dialog.h index ac3a72dde..252720f60 100644 --- a/src/wx/video_waveform_dialog.h +++ b/src/wx/video_waveform_dialog.h @@ -18,7 +18,10 @@ */ +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include class VideoWaveformPlot; diff --git a/src/wx/video_waveform_plot.h b/src/wx/video_waveform_plot.h index 380186074..1e38f5890 100644 --- a/src/wx/video_waveform_plot.h +++ b/src/wx/video_waveform_plot.h @@ -18,7 +18,10 @@ */ +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #include #include #include diff --git a/src/wx/wx_signal_manager.cc b/src/wx/wx_signal_manager.cc index 95e71cbc0..78a98b1d6 100644 --- a/src/wx/wx_signal_manager.cc +++ b/src/wx/wx_signal_manager.cc @@ -18,8 +18,11 @@ */ -#include #include "wx_signal_manager.h" +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS +#include +DCPOMATIC_ENABLE_WARNINGS wxSignalManager::wxSignalManager (wxEvtHandler* h) : _handler (h) diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc index f8756549b..46b122a8a 100644 --- a/src/wx/wx_util.cc +++ b/src/wx/wx_util.cc @@ -31,11 +31,14 @@ #include "lib/util.h" #include "lib/cross.h" #include "lib/job.h" +#include "lib/warnings.h" #include +DCPOMATIC_DISABLE_WARNINGS #include #include #include #include +DCPOMATIC_ENABLE_WARNINGS #include using std::string; -- cgit v1.2.3 From 99c1d1f247343b884af0b51389311484ed265d3b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 27 Jul 2020 11:05:08 +0200 Subject: Fix some unused variable warnings on macOS. --- src/lib/cross_osx.cc | 4 ++-- src/tools/dcpomatic_disk.cc | 3 +++ src/tools/dcpomatic_disk_writer.cc | 2 +- wscript | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src/tools') diff --git a/src/lib/cross_osx.cc b/src/lib/cross_osx.cc index aa05df016..e91d3df16 100644 --- a/src/lib/cross_osx.cc +++ b/src/lib/cross_osx.cc @@ -245,7 +245,7 @@ home_directory () } string -command_and_read (string cmd) +command_and_read (string) { return ""; } @@ -515,7 +515,7 @@ config_path () } -void done_callback(DADiskRef disk, DADissenterRef dissenter, void* context) +void done_callback(DADiskRef, DADissenterRef dissenter, void* context) { LOG_DISK_NC("Unmount finished"); bool* success = reinterpret_cast (context); diff --git a/src/tools/dcpomatic_disk.cc b/src/tools/dcpomatic_disk.cc index 55f2bd440..b94d4bf94 100644 --- a/src/tools/dcpomatic_disk.cc +++ b/src/tools/dcpomatic_disk.cc @@ -35,8 +35,11 @@ #include "lib/job_manager.h" #include "lib/disk_writer_messages.h" #include "lib/version.h" +#include "lib/warnings.h" #include +DCPOMATIC_DISABLE_WARNINGS #include +DCPOMATIC_ENABLE_WARNINGS #ifdef DCPOMATIC_WINDOWS #include #endif diff --git a/src/tools/dcpomatic_disk_writer.cc b/src/tools/dcpomatic_disk_writer.cc index 1e6d10fbf..2c3753e57 100644 --- a/src/tools/dcpomatic_disk_writer.cc +++ b/src/tools/dcpomatic_disk_writer.cc @@ -569,7 +569,7 @@ main () /* I *think* this confumes the notifyd event that we used to start the process, so we only * get started once per notification. */ - xpc_set_event_stream_handler("com.apple.notifyd.matching", DISPATCH_TARGET_QUEUE_DEFAULT, ^(xpc_object_t event) {}); + xpc_set_event_stream_handler("com.apple.notifyd.matching", DISPATCH_TARGET_QUEUE_DEFAULT, ^(xpc_object_t) {}); #endif try { diff --git a/wscript b/wscript index b9e7d6a64..a333f95d8 100644 --- a/wscript +++ b/wscript @@ -549,6 +549,7 @@ def configure(conf): #include \n int main() { new boost::process::child("foo"); }\n """, + cxxflags='-Wno-unused-parameter', msg='Checking for boost process library', lib=deps, uselib_store='BOOST_PROCESS') -- cgit v1.2.3