summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2026-03-18 17:14:55 +0100
committerCarl Hetherington <cth@carlh.net>2026-03-18 17:14:55 +0100
commitb0a1da35fe27761e6c9580d1205536d9280de933 (patch)
tree65161f1af05162bb3060efe72247e491c9ad99d0
parent8ff143858a0f439daddc0b8f2ccb1b633b61a3a2 (diff)
Fix build problems with warnings generated by newer macOS build environments.
-rw-r--r--src/lib/dcpomatic_socket.cc16
-rw-r--r--src/lib/font.h3
-rw-r--r--src/lib/image.cc4
-rw-r--r--src/lib/job.h3
-rw-r--r--src/lib/log.h3
-rw-r--r--src/lib/playlist.h3
-rw-r--r--src/wx/audio_mapping_view.h2
-rw-r--r--src/wx/audio_plot.h2
-rw-r--r--src/wx/auto_crop_dialog.h3
-rw-r--r--src/wx/colour_conversion_editor.h2
-rw-r--r--src/wx/content_colour_conversion_dialog.h2
-rw-r--r--src/wx/controls.h2
-rw-r--r--src/wx/dir_picker_ctrl.h2
-rw-r--r--src/wx/filter_dialog.h2
-rw-r--r--src/wx/focus_manager.h3
-rw-r--r--src/wx/hints_dialog.h2
-rw-r--r--src/wx/job_view.h3
-rw-r--r--src/wx/kdm_cpl_panel.h2
-rw-r--r--src/wx/language_subtag_panel.h2
-rw-r--r--src/wx/language_tag_widget.h2
-rw-r--r--src/wx/name_format_editor.h2
-rw-r--r--src/wx/password_entry.h2
-rw-r--r--src/wx/preferences_page.h2
-rw-r--r--src/wx/rating_dialog.h2
-rw-r--r--src/wx/ratio_picker.h3
-rw-r--r--src/wx/recipients_panel.h2
-rw-r--r--src/wx/region_subtag_widget.h2
-rw-r--r--src/wx/servers_list_dialog.h2
-rw-r--r--src/wx/templates_dialog.h2
-rw-r--r--src/wx/time_picker.h2
-rw-r--r--src/wx/timeline_content_view.h2
-rw-r--r--src/wx/video_view.h2
-rw-r--r--src/wx/video_waveform_plot.cc3
-rw-r--r--src/wx/video_waveform_plot.h2
-rw-r--r--wscript1
35 files changed, 60 insertions, 34 deletions
diff --git a/src/lib/dcpomatic_socket.cc b/src/lib/dcpomatic_socket.cc
index 7aecf752f..33182e4a9 100644
--- a/src/lib/dcpomatic_socket.cc
+++ b/src/lib/dcpomatic_socket.cc
@@ -278,18 +278,18 @@ Socket::check_read_digest ()
DCPOMATIC_ASSERT (_read_digester);
int const size = _read_digester->size ();
- uint8_t ref[size];
- _read_digester->get (ref);
+ std::vector<uint8_t> ref(size);
+ _read_digester->get(ref.data());
/* Make sure _read_digester is gone before we call read() so that the digest
* isn't itself digested.
*/
_read_digester.reset ();
- uint8_t actual[size];
- read (actual, size);
+ std::vector<uint8_t> actual(size);
+ read(actual.data(), size);
- return memcmp(ref, actual, size) == 0;
+ return ref == actual;
}
@@ -299,15 +299,15 @@ Socket::finish_write_digest ()
DCPOMATIC_ASSERT (_write_digester);
int const size = _write_digester->size();
- uint8_t buffer[size];
- _write_digester->get (buffer);
+ std::vector<uint8_t> buffer(size);
+ _write_digester->get(buffer.data());
/* Make sure _write_digester is gone before we call write() so that the digest
* isn't itself digested.
*/
_write_digester.reset ();
- write (buffer, size);
+ write(buffer.data(), size);
}
diff --git a/src/lib/font.h b/src/lib/font.h
index 669504579..55e3f33b7 100644
--- a/src/lib/font.h
+++ b/src/lib/font.h
@@ -24,9 +24,12 @@
#include <dcp/array_data.h>
+#include <dcp/warnings.h>
#include <libcxml/cxml.h>
#include <boost/optional.hpp>
+LIBDCP_DISABLE_WARNINGS
#include <boost/signals2.hpp>
+LIBDCP_ENABLE_WARNINGS
#include <boost/filesystem.hpp>
#include <string>
diff --git a/src/lib/image.cc b/src/lib/image.cc
index de57ee877..51e894900 100644
--- a/src/lib/image.cc
+++ b/src/lib/image.cc
@@ -286,7 +286,7 @@ Image::crop_scale_window(
round_height_for_subsampling((out_size.height - inter_size.height) / 2, out_desc)
);
- uint8_t* scale_out_data[out->planes()];
+ std::vector<uint8_t*> scale_out_data(out->planes());
for (int c = 0; c < out->planes(); ++c) {
int const x = lrintf(out->bytes_per_pixel(c) * corner.x);
scale_out_data[c] = out->data()[c] + x + out->stride()[c] * (corner.y / out->vertical_factor(c));
@@ -296,7 +296,7 @@ Image::crop_scale_window(
scale_context,
scale_in_data.data(), stride(),
0, cropped_size.height,
- scale_out_data, out->stride()
+ scale_out_data.data(), out->stride()
);
sws_freeContext(scale_context);
diff --git a/src/lib/job.h b/src/lib/job.h
index d46e5c73a..f435d815a 100644
--- a/src/lib/job.h
+++ b/src/lib/job.h
@@ -29,8 +29,11 @@
#include "signaller.h"
+#include <dcp/warnings.h>
#include <boost/atomic.hpp>
+LIBDCP_DISABLE_WARNINGS
#include <boost/signals2.hpp>
+LIBDCP_ENABLE_WARNINGS
#include <boost/thread.hpp>
#include <boost/thread/mutex.hpp>
#include <string>
diff --git a/src/lib/log.h b/src/lib/log.h
index 142e46223..c6685bda1 100644
--- a/src/lib/log.h
+++ b/src/lib/log.h
@@ -30,9 +30,12 @@
#include "log_entry.h"
#include <dcp/types.h>
+#include <dcp/warnings.h>
#include <boost/thread/mutex.hpp>
#include <boost/filesystem.hpp>
+LIBDCP_DISABLE_WARNINGS
#include <boost/signals2.hpp>
+LIBDCP_ENABLE_WARNINGS
#include <string>
diff --git a/src/lib/playlist.h b/src/lib/playlist.h
index 0d38cbf67..0ccd8c290 100644
--- a/src/lib/playlist.h
+++ b/src/lib/playlist.h
@@ -28,8 +28,11 @@
#include "frame_rate_change.h"
#include "path_behaviour.h"
#include "types.h"
+#include <dcp/warnings.h>
#include <libcxml/cxml.h>
+LIBDCP_DISABLE_WARNINGS
#include <boost/signals2.hpp>
+LIBDCP_ENABLE_WARNINGS
#include <boost/thread.hpp>
#include <list>
diff --git a/src/wx/audio_mapping_view.h b/src/wx/audio_mapping_view.h
index f3e46532e..5c5efa1a9 100644
--- a/src/wx/audio_mapping_view.h
+++ b/src/wx/audio_mapping_view.h
@@ -29,8 +29,8 @@
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
-LIBDCP_ENABLE_WARNINGS
#include <boost/signals2.hpp>
+LIBDCP_ENABLE_WARNINGS
/** @class AudioMappingView
diff --git a/src/wx/audio_plot.h b/src/wx/audio_plot.h
index fe7821e33..c03e1ddfd 100644
--- a/src/wx/audio_plot.h
+++ b/src/wx/audio_plot.h
@@ -24,8 +24,8 @@
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
-LIBDCP_ENABLE_WARNINGS
#include <boost/signals2.hpp>
+LIBDCP_ENABLE_WARNINGS
#include <vector>
diff --git a/src/wx/auto_crop_dialog.h b/src/wx/auto_crop_dialog.h
index 383f95a5a..9658ccecd 100644
--- a/src/wx/auto_crop_dialog.h
+++ b/src/wx/auto_crop_dialog.h
@@ -25,7 +25,10 @@
#include "table_dialog.h"
#include "lib/crop.h"
+#include <dcp/warnings.h>
+LIBDCP_DISABLE_WARNINGS
#include <boost/signals2.hpp>
+LIBDCP_ENABLE_WARNINGS
class SpinCtrl;
diff --git a/src/wx/colour_conversion_editor.h b/src/wx/colour_conversion_editor.h
index de5ffb794..e70768a42 100644
--- a/src/wx/colour_conversion_editor.h
+++ b/src/wx/colour_conversion_editor.h
@@ -26,8 +26,8 @@
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
-LIBDCP_ENABLE_WARNINGS
#include <boost/signals2.hpp>
+LIBDCP_ENABLE_WARNINGS
class ColourConversion;
diff --git a/src/wx/content_colour_conversion_dialog.h b/src/wx/content_colour_conversion_dialog.h
index 84fb47e5a..37a0f5f80 100644
--- a/src/wx/content_colour_conversion_dialog.h
+++ b/src/wx/content_colour_conversion_dialog.h
@@ -23,8 +23,8 @@
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
-LIBDCP_ENABLE_WARNINGS
#include <boost/signals2.hpp>
+LIBDCP_ENABLE_WARNINGS
class ColourConversionEditor;
diff --git a/src/wx/controls.h b/src/wx/controls.h
index 109109f2c..3dec6fb88 100644
--- a/src/wx/controls.h
+++ b/src/wx/controls.h
@@ -29,8 +29,8 @@
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
-LIBDCP_ENABLE_WARNINGS
#include <boost/signals2.hpp>
+LIBDCP_ENABLE_WARNINGS
class CheckBox;
diff --git a/src/wx/dir_picker_ctrl.h b/src/wx/dir_picker_ctrl.h
index fc5d5a755..f4b0fb31b 100644
--- a/src/wx/dir_picker_ctrl.h
+++ b/src/wx/dir_picker_ctrl.h
@@ -26,8 +26,8 @@
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
-LIBDCP_ENABLE_WARNINGS
#include <boost/signals2.hpp>
+LIBDCP_ENABLE_WARNINGS
class Button;
diff --git a/src/wx/filter_dialog.h b/src/wx/filter_dialog.h
index aaa43c3e4..b667bf7b5 100644
--- a/src/wx/filter_dialog.h
+++ b/src/wx/filter_dialog.h
@@ -27,8 +27,8 @@
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
-LIBDCP_ENABLE_WARNINGS
#include <boost/signals2.hpp>
+LIBDCP_ENABLE_WARNINGS
class Film;
diff --git a/src/wx/focus_manager.h b/src/wx/focus_manager.h
index ca4c4e384..b03708112 100644
--- a/src/wx/focus_manager.h
+++ b/src/wx/focus_manager.h
@@ -19,7 +19,10 @@
*/
+#include <dcp/warnings.h>
+LIBDCP_DISABLE_WARNINGS
#include <boost/signals2.hpp>
+LIBDCP_ENABLE_WARNINGS
class wxTextCtrl;
diff --git a/src/wx/hints_dialog.h b/src/wx/hints_dialog.h
index 44420405a..005f0f35d 100644
--- a/src/wx/hints_dialog.h
+++ b/src/wx/hints_dialog.h
@@ -23,8 +23,8 @@
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
-LIBDCP_ENABLE_WARNINGS
#include <boost/signals2.hpp>
+LIBDCP_ENABLE_WARNINGS
class wxRichTextCtrl;
diff --git a/src/wx/job_view.h b/src/wx/job_view.h
index a3ec59bf5..e02ede087 100644
--- a/src/wx/job_view.h
+++ b/src/wx/job_view.h
@@ -23,7 +23,10 @@
#define DCPOMATIC_JOB_VIEW_H
+#include <dcp/warnings.h>
+LIBDCP_DISABLE_WARNINGS
#include <boost/signals2.hpp>
+LIBDCP_ENABLE_WARNINGS
class CheckBox;
diff --git a/src/wx/kdm_cpl_panel.h b/src/wx/kdm_cpl_panel.h
index 441823afa..f1144fa3d 100644
--- a/src/wx/kdm_cpl_panel.h
+++ b/src/wx/kdm_cpl_panel.h
@@ -26,7 +26,9 @@ LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
LIBDCP_ENABLE_WARNINGS
#include <boost/filesystem.hpp>
+LIBDCP_DISABLE_WARNINGS
#include <boost/signals2.hpp>
+LIBDCP_ENABLE_WARNINGS
class KDMCPLPanel : public wxPanel
diff --git a/src/wx/language_subtag_panel.h b/src/wx/language_subtag_panel.h
index 6f1b5fd01..892784cbc 100644
--- a/src/wx/language_subtag_panel.h
+++ b/src/wx/language_subtag_panel.h
@@ -24,8 +24,8 @@
LIBDCP_DISABLE_WARNINGS
#include <wx/srchctrl.h>
#include <wx/wx.h>
-LIBDCP_ENABLE_WARNINGS
#include <boost/signals2.hpp>
+LIBDCP_ENABLE_WARNINGS
/** A panel which offers a list of subtags in two columns: subtag and name, and has a search box to
diff --git a/src/wx/language_tag_widget.h b/src/wx/language_tag_widget.h
index ff3eeb727..bda8386df 100644
--- a/src/wx/language_tag_widget.h
+++ b/src/wx/language_tag_widget.h
@@ -23,8 +23,8 @@
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
-LIBDCP_ENABLE_WARNINGS
#include <boost/signals2.hpp>
+LIBDCP_ENABLE_WARNINGS
class wxButton;
diff --git a/src/wx/name_format_editor.h b/src/wx/name_format_editor.h
index 70a02a902..06641ef10 100644
--- a/src/wx/name_format_editor.h
+++ b/src/wx/name_format_editor.h
@@ -27,8 +27,8 @@
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
-LIBDCP_ENABLE_WARNINGS
#include <boost/signals2.hpp>
+LIBDCP_ENABLE_WARNINGS
class NameFormatEditor
diff --git a/src/wx/password_entry.h b/src/wx/password_entry.h
index f2d4f9ed0..52386a183 100644
--- a/src/wx/password_entry.h
+++ b/src/wx/password_entry.h
@@ -22,8 +22,8 @@
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
-LIBDCP_ENABLE_WARNINGS
#include <boost/signals2.hpp>
+LIBDCP_ENABLE_WARNINGS
class CheckBox;
diff --git a/src/wx/preferences_page.h b/src/wx/preferences_page.h
index 44605ba86..2361cd70f 100644
--- a/src/wx/preferences_page.h
+++ b/src/wx/preferences_page.h
@@ -26,8 +26,8 @@
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/preferences.h>
-LIBDCP_ENABLE_WARNINGS
#include <boost/signals2.hpp>
+LIBDCP_ENABLE_WARNINGS
#undef CreateWindow
diff --git a/src/wx/rating_dialog.h b/src/wx/rating_dialog.h
index e8dfc2d9c..dd423a646 100644
--- a/src/wx/rating_dialog.h
+++ b/src/wx/rating_dialog.h
@@ -23,8 +23,8 @@
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
-LIBDCP_ENABLE_WARNINGS
#include <boost/signals2.hpp>
+LIBDCP_ENABLE_WARNINGS
class wxChoice;
diff --git a/src/wx/ratio_picker.h b/src/wx/ratio_picker.h
index 93e78ae9f..e6ee55335 100644
--- a/src/wx/ratio_picker.h
+++ b/src/wx/ratio_picker.h
@@ -19,9 +19,12 @@
*/
+#include <dcp/warnings.h>
#include <wx/wx.h>
#include <boost/optional.hpp>
+LIBDCP_DISABLE_WARNINGS
#include <boost/signals2.hpp>
+LIBDCP_ENABLE_WARNINGS
class CheckBox;
diff --git a/src/wx/recipients_panel.h b/src/wx/recipients_panel.h
index cecfa3d33..94e86fa57 100644
--- a/src/wx/recipients_panel.h
+++ b/src/wx/recipients_panel.h
@@ -27,8 +27,8 @@ LIBDCP_DISABLE_WARNINGS
#include <wx/srchctrl.h>
#include <wx/treectrl.h>
#include <wx/wx.h>
-LIBDCP_ENABLE_WARNINGS
#include <boost/signals2.hpp>
+LIBDCP_ENABLE_WARNINGS
#include <list>
#include <map>
diff --git a/src/wx/region_subtag_widget.h b/src/wx/region_subtag_widget.h
index 725f8652c..f7be1db87 100644
--- a/src/wx/region_subtag_widget.h
+++ b/src/wx/region_subtag_widget.h
@@ -23,8 +23,8 @@
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
-LIBDCP_ENABLE_WARNINGS
#include <boost/signals2.hpp>
+LIBDCP_ENABLE_WARNINGS
class wxButton;
diff --git a/src/wx/servers_list_dialog.h b/src/wx/servers_list_dialog.h
index 618cba65a..3281e121a 100644
--- a/src/wx/servers_list_dialog.h
+++ b/src/wx/servers_list_dialog.h
@@ -23,8 +23,8 @@
LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
#include <wx/listctrl.h>
-LIBDCP_ENABLE_WARNINGS
#include <boost/signals2.hpp>
+LIBDCP_ENABLE_WARNINGS
class ServersListDialog : public wxDialog
{
diff --git a/src/wx/templates_dialog.h b/src/wx/templates_dialog.h
index e3568a08c..d386ea54a 100644
--- a/src/wx/templates_dialog.h
+++ b/src/wx/templates_dialog.h
@@ -23,8 +23,8 @@
LIBDCP_DISABLE_WARNINGS
#include <wx/listctrl.h>
#include <wx/wx.h>
-LIBDCP_ENABLE_WARNINGS
#include <boost/signals2.hpp>
+LIBDCP_ENABLE_WARNINGS
class TemplatesDialog : public wxDialog
diff --git a/src/wx/time_picker.h b/src/wx/time_picker.h
index 50177afd3..36e45a1c8 100644
--- a/src/wx/time_picker.h
+++ b/src/wx/time_picker.h
@@ -22,8 +22,8 @@
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
-LIBDCP_ENABLE_WARNINGS
#include <boost/signals2.hpp>
+LIBDCP_ENABLE_WARNINGS
class wxSpinCtrl;
diff --git a/src/wx/timeline_content_view.h b/src/wx/timeline_content_view.h
index 7b206d30f..c3bb3ccc1 100644
--- a/src/wx/timeline_content_view.h
+++ b/src/wx/timeline_content_view.h
@@ -28,8 +28,8 @@
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
-LIBDCP_ENABLE_WARNINGS
#include <boost/signals2.hpp>
+LIBDCP_ENABLE_WARNINGS
class Content;
diff --git a/src/wx/video_view.h b/src/wx/video_view.h
index 6de53530a..6b35d12cd 100644
--- a/src/wx/video_view.h
+++ b/src/wx/video_view.h
@@ -34,8 +34,8 @@
#include <dcp/types.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
-LIBDCP_ENABLE_WARNINGS
#include <boost/signals2.hpp>
+LIBDCP_ENABLE_WARNINGS
#include <boost/thread.hpp>
diff --git a/src/wx/video_waveform_plot.cc b/src/wx/video_waveform_plot.cc
index 2827689a7..d9fbfb11e 100644
--- a/src/wx/video_waveform_plot.cc
+++ b/src/wx/video_waveform_plot.cc
@@ -162,8 +162,7 @@ VideoWaveformPlot::create_waveform ()
strip is the number of samples in image with the corresponding group of
values.
*/
- int strip[waveform_height];
- memset (strip, 0, waveform_height * sizeof(int));
+ std::vector<int> strip(waveform_height);
int* ip = _image->data (_component) + x;
for (int y = 0; y < image_size.height; ++y) {
diff --git a/src/wx/video_waveform_plot.h b/src/wx/video_waveform_plot.h
index e6e7a6f3d..12cc6f2ff 100644
--- a/src/wx/video_waveform_plot.h
+++ b/src/wx/video_waveform_plot.h
@@ -22,8 +22,8 @@
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
-LIBDCP_ENABLE_WARNINGS
#include <boost/signals2.hpp>
+LIBDCP_ENABLE_WARNINGS
namespace dcp {
diff --git a/wscript b/wscript
index f9070cc47..c2c795a7c 100644
--- a/wscript
+++ b/wscript
@@ -624,6 +624,7 @@ def configure(conf):
int main() { boost::signals2::signal<void (int)> x; }\n
""",
msg='Checking for boost signals2 library',
+ cxxflags='-Wno-unused-parameter',
uselib_store='BOOST_SIGNALS2')
conf.check_cxx(fragment="""