fix a Wsigncompare and 2 -Wuninitialized
authorRobin Gareus <robin@gareus.org>
Sun, 1 May 2016 11:35:30 +0000 (13:35 +0200)
committerRobin Gareus <robin@gareus.org>
Sun, 1 May 2016 11:35:30 +0000 (13:35 +0200)
gtk2_ardour/ardour_ui.cc
libs/ardour/ardour/midi_model.h
libs/ardour/plugin_insert.cc

index cd2411430ec7fe81b40215af603ada1df84a9382..fd384ecf81effc52123178a75291c49ba6b099c2 100644 (file)
@@ -5393,7 +5393,7 @@ ARDOUR_UI::key_event_handler (GdkEventKey* ev, Gtk::Window* event_window)
 static Gtkmm2ext::Bindings*
 get_bindings_from_widget_heirarchy (GtkWidget* w)
 {
-       void* p;
+       void* p = NULL;
 
        while (w) {
                if ((p = g_object_get_data (G_OBJECT(w), "ardour-bindings")) != 0) {
index 21c67c2b32426e09565d041b923a526c3bc88a4c..254d6100770a25ee05e2087f1cf668e524543a49 100644 (file)
@@ -175,8 +175,9 @@ public:
 
        private:
                struct Change {
+                       Change () : sysex_id (0) {}
                        boost::shared_ptr<Evoral::Event<TimeType> > sysex;
-                       gint sysex_id;
+                       gint sysex_id;
                        SysExDiffCommand::Property property;
                        TimeType old_time;
                        TimeType new_time;
index 502f58153253043ecfc6ad977d99adccd828ddc2..7aed4cfa0bebd49f74bab9deff5b6816b1603682 100644 (file)
@@ -2254,14 +2254,14 @@ PluginInsert::set_state(const XMLNode& node, int version)
                }
                if (strncmp ((*i)->name ().c_str(), X_("InputMap-"), 9) == 0) {
                        long pc = atol (&((*i)->name().c_str()[9]));
-                       if (pc >=0 && pc <= get_count()) {
+                       if (pc >= 0 && pc <= (long) get_count()) {
                                _in_map[pc] = ChanMapping (**i);
                                ++in_maps;
                        }
                }
                if (strncmp ((*i)->name ().c_str(), X_("OutputMap-"), 10) == 0) {
                        long pc = atol (&((*i)->name().c_str()[10]));
-                       if (pc >=0 && pc <= get_count()) {
+                       if (pc >= 0 && pc <= (long) get_count()) {
                                _out_map[pc] = ChanMapping (**i);
                                ++out_maps;
                        }