From ccb67af328f99e55dd9e3a6c01f2128f59016b4a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 30 Apr 2017 01:32:43 +0100 Subject: [PATCH] Fix some cppcheck warnings. --- src/lib/content_video.h | 4 +++- src/lib/player.cc | 7 ------- src/lib/player.h | 1 - src/lib/scoped_temporary.cc | 1 + src/lib/writer.h | 3 +++ 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/lib/content_video.h b/src/lib/content_video.h index ddc03b265..f59e99cfc 100644 --- a/src/lib/content_video.h +++ b/src/lib/content_video.h @@ -30,7 +30,9 @@ class ContentVideo { public: ContentVideo () - : part (PART_WHOLE) + : frame (0) + , eyes (EYES_LEFT) + , part (PART_WHOLE) {} ContentVideo (boost::shared_ptr i, Frame f, Eyes e, Part p) diff --git a/src/lib/player.cc b/src/lib/player.cc index 72922d70a..7ede96a0d 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -417,13 +417,6 @@ Player::set_ignore_video () _ignore_video = true; } -/** Set this player never to produce any audio data */ -void -Player::set_ignore_audio () -{ - _ignore_audio = true; -} - /** Set whether or not this player should always burn text subtitles into the image, * regardless of the content settings. * @param burn true to always burn subtitles, false to obey content settings. diff --git a/src/lib/player.h b/src/lib/player.h index eb6589b56..719e42895 100644 --- a/src/lib/player.h +++ b/src/lib/player.h @@ -62,7 +62,6 @@ public: void set_video_container_size (dcp::Size); void set_ignore_video (); - void set_ignore_audio (); void set_enable_subtitles (bool enable); void set_always_burn_subtitles (bool burn); void set_fast (); diff --git a/src/lib/scoped_temporary.cc b/src/lib/scoped_temporary.cc index 5c885e4df..4043caf3d 100644 --- a/src/lib/scoped_temporary.cc +++ b/src/lib/scoped_temporary.cc @@ -50,6 +50,7 @@ ScopedTemporary::c_str () const FILE* ScopedTemporary::open (char const * params) { + close (); _open = fopen (c_str(), params); return _open; } diff --git a/src/lib/writer.h b/src/lib/writer.h index 2a78637e5..1e4d3b6a3 100644 --- a/src/lib/writer.h +++ b/src/lib/writer.h @@ -47,6 +47,9 @@ struct QueueItem public: QueueItem () : size (0) + , reel (0) + , frame (0) + , eyes (EYES_BOTH) {} enum Type { -- 2.30.2