From 80c61db0cda63e565197abcbbc11b504c9a76c17 Mon Sep 17 00:00:00 2001 From: Sakari Bergen Date: Sat, 11 Dec 2010 15:09:47 +0000 Subject: Fix compiler warnings git-svn-id: svn://localhost/ardour2/branches/3.0@8246 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/group_tabs.cc | 2 +- gtk2_ardour/mixer_strip.cc | 1 - gtk2_ardour/rgb_macros.h | 28 ++++++++++++++-------------- libs/ardour/ladspa_plugin.cc | 4 ++-- libs/ardour/uri_map.cc | 2 +- 5 files changed, 18 insertions(+), 19 deletions(-) diff --git a/gtk2_ardour/group_tabs.cc b/gtk2_ardour/group_tabs.cc index 560d1f7c11..a1aedc6c5b 100644 --- a/gtk2_ardour/group_tabs.cc +++ b/gtk2_ardour/group_tabs.cc @@ -279,7 +279,7 @@ GroupTabs::click_to_tab (double c, list::iterator* prev, list::iterato *next = i; if (under) { - *next++; + (*next)++; } } diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index 7f1391a640..324f36cf91 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -1033,7 +1033,6 @@ MixerStrip::update_io_button (boost::shared_ptr route, Width widt ostringstream label; string label_string; - char * label_cstr; bool have_label = false; bool each_io_has_one_connection = true; diff --git a/gtk2_ardour/rgb_macros.h b/gtk2_ardour/rgb_macros.h index 8252349452..352585bea8 100644 --- a/gtk2_ardour/rgb_macros.h +++ b/gtk2_ardour/rgb_macros.h @@ -133,10 +133,10 @@ UINT_TO_RGB((i), ((guchar*)p), ((guchar*)p)+1, ((guchar*)p)+2) gint ph_a0, ph_a1; \ gint ph_colr=(colr), ph_colg=(colg), ph_colb=(colb); \ \ - ph_a0 = MAX(ph_buf->rect.x0, (ptx0)); \ - ph_a1 = MIN(ph_buf->rect.x1, (ptx1)); \ + ph_a0 = MAX(ph_buf->rect.x0, (gint)(ptx0)); \ + ph_a1 = MIN(ph_buf->rect.x1, (gint)(ptx1)); \ \ - if (ph_a0 < ph_a1 && BUF_INBOUNDS_Y(ph_buf, pty)) { \ + if (ph_a0 < ph_a1 && BUF_INBOUNDS_Y(ph_buf, (gint)(pty))) { \ ph_p = BUF_PTR(ph_buf, ph_a0, pty); \ while (ph_a0 < ph_a1) { \ PIXEL_RGB(ph_p, ph_colr, ph_colg, ph_colb); \ @@ -152,10 +152,10 @@ UINT_TO_RGB((i), ((guchar*)p), ((guchar*)p)+1, ((guchar*)p)+2) gint ph_a0, ph_a1; \ gint ph_colr=(colr), ph_colg=(colg), ph_colb=(colb); \ \ - ph_a0 = MAX(ph_buf->rect.x0, (ptx0)); \ - ph_a1 = MIN(ph_buf->rect.x1, (ptx1)); \ + ph_a0 = MAX(ph_buf->rect.x0, (gint)(ptx0)); \ + ph_a1 = MIN(ph_buf->rect.x1, (gint)(ptx1)); \ \ - if (ph_a0 < ph_a1 && BUF_INBOUNDS_Y(ph_buf, pty)) { \ + if (ph_a0 < ph_a1 && BUF_INBOUNDS_Y(ph_buf, (gint)(pty))) { \ ph_p = BUF_PTR(ph_buf, ph_a0, pty); \ while (ph_a0 < ph_a1) { \ PIXEL_RGB(ph_p, ph_colr, ph_colg, ph_colb); \ @@ -171,10 +171,10 @@ UINT_TO_RGB((i), ((guchar*)p), ((guchar*)p)+1, ((guchar*)p)+2) gint ph_a0, ph_a1; \ gint ph_colr=(colr), ph_colg=(colg), ph_colb=(colb), ph_cola=(cola); \ \ - ph_a0 = MAX(ph_buf->rect.x0, (ptx0)); \ - ph_a1 = MIN(ph_buf->rect.x1, (ptx1)); \ + ph_a0 = MAX(ph_buf->rect.x0, (gint)(ptx0)); \ + ph_a1 = MIN(ph_buf->rect.x1, (gint)(ptx1)); \ \ - if (ph_a0 < ph_a1 && BUF_INBOUNDS_Y(ph_buf, pty)) { \ + if (ph_a0 < ph_a1 && BUF_INBOUNDS_Y(ph_buf, (gint)(pty))) { \ ph_p = BUF_PTR(ph_buf, ph_a0, pty); \ while (ph_a0 < ph_a1) { \ PIXEL_RGBA(ph_p, ph_colr, ph_colg, ph_colb, ph_cola); \ @@ -190,10 +190,10 @@ UINT_TO_RGB((i), ((guchar*)p), ((guchar*)p)+1, ((guchar*)p)+2) gint pv_b0, pv_b1; \ gint pv_colr=(colr), pv_colg=(colg), pv_colb=(colb);\ \ - pv_b0 = MAX(pv_buf->rect.y0, (pty0)); \ - pv_b1 = MIN(pv_buf->rect.y1, (pty1)); \ + pv_b0 = MAX(pv_buf->rect.y0, (gint)(pty0)); \ + pv_b1 = MIN(pv_buf->rect.y1, (gint)(pty1)); \ \ - if (pv_b0 < pv_b1 && BUF_INBOUNDS_X(pv_buf, ptx)) { \ + if (pv_b0 < pv_b1 && BUF_INBOUNDS_X(pv_buf, (gint)(ptx))) { \ pv_p = BUF_PTR(pv_buf, ptx, pv_b0); \ while (pv_b0 < pv_b1) { \ PIXEL_RGB(pv_p, pv_colr, pv_colg, pv_colb); \ @@ -208,8 +208,8 @@ UINT_TO_RGB((i), ((guchar*)p), ((guchar*)p)+1, ((guchar*)p)+2) guchar* fpv_p; \ gint fpv_b0, fpv_b1; \ \ - fpv_b0 = MAX(fpv_buf->rect.y0, (pty0)); \ - fpv_b1 = MIN(fpv_buf->rect.y1, (pty1)); \ + fpv_b0 = MAX(fpv_buf->rect.y0, (gint)(pty0)); \ + fpv_b1 = MIN(fpv_buf->rect.y1, (gint)(pty1)); \ \ fpv_p = BUF_PTR(fpv_buf, ptx, fpv_b0); \ \ diff --git a/libs/ardour/ladspa_plugin.cc b/libs/ardour/ladspa_plugin.cc index 8214475065..43fa8e43ee 100644 --- a/libs/ardour/ladspa_plugin.cc +++ b/libs/ardour/ladspa_plugin.cc @@ -867,7 +867,7 @@ LadspaPlugin::do_save_preset (string name) std::string unique (unique_id()); if (!isdigit (unique[0])) { - return false; + return ""; } uint32_t const id = atol (unique.c_str()); @@ -885,7 +885,7 @@ LadspaPlugin::do_save_preset (string name) string const envvar = preset_envvar (); if (envvar.empty()) { warning << _("Could not locate HOME. Preset not saved.") << endmsg; - return false; + return ""; } string const source = preset_source (envvar); diff --git a/libs/ardour/uri_map.cc b/libs/ardour/uri_map.cc index 116236a8b6..9b5843a40e 100644 --- a/libs/ardour/uri_map.cc +++ b/libs/ardour/uri_map.cc @@ -61,7 +61,7 @@ URIMap::uri_to_id(const char* map, } else { if (_global_to_event.size() + 1 > UINT16_MAX) { PBD::error << "Event URI " << uri << " ID out of range." << endl; - return NULL; + return 0; } const uint16_t ev_id = _global_to_event.size() + 1; assert(_event_to_global.find(ev_id) == _event_to_global.end()); -- cgit v1.2.3