Fix compiler warnings
authorSakari Bergen <sakari.bergen@beatwaves.net>
Sat, 11 Dec 2010 15:09:47 +0000 (15:09 +0000)
committerSakari Bergen <sakari.bergen@beatwaves.net>
Sat, 11 Dec 2010 15:09:47 +0000 (15:09 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@8246 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/group_tabs.cc
gtk2_ardour/mixer_strip.cc
gtk2_ardour/rgb_macros.h
libs/ardour/ladspa_plugin.cc
libs/ardour/uri_map.cc

index 560d1f7c111bb123da79e0587dd0ef24225a180e..a1aedc6c5bfadf85cd8babf951678ca6076316b0 100644 (file)
@@ -279,7 +279,7 @@ GroupTabs::click_to_tab (double c, list<Tab>::iterator* prev, list<Tab>::iterato
                *next = i;
 
                if (under) {
-                       *next++;
+                       (*next)++;
                }
        }
 
index 7f1391a6400fdf55b5e23d630e08de0f332578d7..324f36cf91e7cfe6dceb19b5e7b6f07ccf1fe37e 100644 (file)
@@ -1033,7 +1033,6 @@ MixerStrip::update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width widt
 
        ostringstream label;
        string label_string;
-       char * label_cstr;
 
        bool have_label = false;
        bool each_io_has_one_connection = true;
index 8252349452a9f2bdd61c1919e4bf2d0b0a5d6e01..352585bea8debe8502575303e289e7a845f2ff68 100644 (file)
@@ -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); \
 \
index 8214475065c9762aaaa1e13e7b18f8ac46e3010a..43fa8e43eea7698cbe0370265788ecb4d4e327d3 100644 (file)
@@ -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);
index 116236a8b69f366faa60881544a2d416b96f8c49..9b5843a40e300e410ce25b65fa26a845a0e37def 100644 (file)
@@ -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());