summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-12-22 20:42:09 +0000
committerCarl Hetherington <cth@carlh.net>2012-12-22 20:42:09 +0000
commit21d3f3889ede9bd4b2c48424715e44ad2c405500 (patch)
tree720382f460c5e6139f7aedc9f9106ef9a6cb3675 /src
parent9de1a9516f1fad4cc669cb7622b8f2828eddcbf9 (diff)
Add -Wextra and fix the warnings.
Diffstat (limited to 'src')
-rw-r--r--src/lib/combiner.cc4
-rw-r--r--src/lib/decoder.cc5
-rw-r--r--src/lib/film.cc3
-rw-r--r--src/lib/util.cc1
-rw-r--r--src/tools/dvdomatic.cc4
-rw-r--r--src/wx/config_dialog.cc2
-rw-r--r--src/wx/film_viewer.cc6
7 files changed, 13 insertions, 12 deletions
diff --git a/src/lib/combiner.cc b/src/lib/combiner.cc
index d5f55026b..68aafd2a2 100644
--- a/src/lib/combiner.cc
+++ b/src/lib/combiner.cc
@@ -29,11 +29,11 @@ Combiner::Combiner (Log* log)
}
/** Process video for the left half of the frame.
+ * Subtitle parameter will be ignored.
* @param image Frame image.
- * @param sub Subtitle (which will be ignored)
*/
void
-Combiner::process_video (shared_ptr<Image> image, bool, shared_ptr<Subtitle> sub)
+Combiner::process_video (shared_ptr<Image> image, bool, shared_ptr<Subtitle>)
{
_image = image;
}
diff --git a/src/lib/decoder.cc b/src/lib/decoder.cc
index 61e63460b..7066b488e 100644
--- a/src/lib/decoder.cc
+++ b/src/lib/decoder.cc
@@ -57,12 +57,11 @@ Decoder::Decoder (boost::shared_ptr<Film> f, boost::shared_ptr<const DecodeOptio
_film_connection = f->Changed.connect (bind (&Decoder::film_changed, this, _1));
}
-/** Seek.
- * @param p Position as a source timestamp in seconds.
+/** Seek to a position as a source timestamp in seconds.
* @return true on error.
*/
bool
-Decoder::seek (double p)
+Decoder::seek (double)
{
throw DecodeError ("decoder does not support seek");
}
diff --git a/src/lib/film.cc b/src/lib/film.cc
index e7687fe3c..1abf8e91f 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -141,7 +141,8 @@ Film::Film (string d, bool must_exist)
}
Film::Film (Film const & o)
- : _log (0)
+ : boost::enable_shared_from_this<Film> (o)
+ , _log (0)
, _directory (o._directory)
, _name (o._name)
, _use_dci_name (o._use_dci_name)
diff --git a/src/lib/util.cc b/src/lib/util.cc
index a68496e94..45965385c 100644
--- a/src/lib/util.cc
+++ b/src/lib/util.cc
@@ -428,6 +428,7 @@ Socket::check ()
void
Socket::connect (asio::ip::basic_resolver_entry<asio::ip::tcp> const & endpoint, int timeout)
{
+ _deadline.expires_from_now (posix_time::seconds (timeout));
system::error_code ec = asio::error::would_block;
_socket.async_connect (endpoint, lambda::var(ec) = lambda::_1);
do {
diff --git a/src/tools/dvdomatic.cc b/src/tools/dvdomatic.cc
index 9d0d58662..055c5a066 100644
--- a/src/tools/dvdomatic.cc
+++ b/src/tools/dvdomatic.cc
@@ -372,13 +372,13 @@ public:
static const wxCmdLineEntryDesc command_line_description[] = {
{ wxCMD_LINE_OPTION, "l", "log", "set log level (silent, verbose or timing)", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
{ wxCMD_LINE_PARAM, 0, 0, "film to load", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE | wxCMD_LINE_PARAM_OPTIONAL },
- { wxCMD_LINE_NONE }
+ { wxCMD_LINE_NONE, "", "", "", wxCmdLineParamType (0), 0 }
};
#else
static const wxCmdLineEntryDesc command_line_description[] = {
{ wxCMD_LINE_OPTION, wxT("l"), wxT("log"), wxT("set log level (silent, verbose or timing)"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
{ wxCMD_LINE_PARAM, 0, 0, wxT("film to load"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE | wxCMD_LINE_PARAM_OPTIONAL },
- { wxCMD_LINE_NONE }
+ { wxCMD_LINE_NONE, "", "", "", wxCmdLineParamType (0), 0 }
};
#endif
diff --git a/src/wx/config_dialog.cc b/src/wx/config_dialog.cc
index abc6bcdeb..adf039e41 100644
--- a/src/wx/config_dialog.cc
+++ b/src/wx/config_dialog.cc
@@ -307,7 +307,7 @@ ConfigDialog::remove_server_clicked (wxCommandEvent &)
}
void
-ConfigDialog::server_selection_changed (wxListEvent& ev)
+ConfigDialog::server_selection_changed (wxListEvent &)
{
int const i = _servers->GetNextItem (-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
_edit_server->Enable (i >= 0);
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc
index 73ed13e50..3d8198457 100644
--- a/src/wx/film_viewer.cc
+++ b/src/wx/film_viewer.cc
@@ -81,7 +81,7 @@ FilmViewer::FilmViewer (shared_ptr<Film> f, wxWindow* p)
_play_button->Connect (wxID_ANY, wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler (FilmViewer::play_clicked), 0, this);
_timer.Connect (wxID_ANY, wxEVT_TIMER, wxTimerEventHandler (FilmViewer::timer), 0, this);
- set_film (_film);
+ set_film (f);
JobManager::instance()->ActiveJobsChanged.connect (
bind (&FilmViewer::active_jobs_changed, this, _1)
@@ -165,7 +165,7 @@ FilmViewer::decoder_changed ()
}
void
-FilmViewer::timer (wxTimerEvent& ev)
+FilmViewer::timer (wxTimerEvent &)
{
if (!_film) {
return;
@@ -186,7 +186,7 @@ FilmViewer::timer (wxTimerEvent& ev)
void
-FilmViewer::paint_panel (wxPaintEvent& ev)
+FilmViewer::paint_panel (wxPaintEvent &)
{
wxPaintDC dc (_panel);