Fix some compilation warnings
authorJulien de Kozak <jdekozak@hotmail.com>
Sun, 24 Mar 2013 13:55:56 +0000 (14:55 +0100)
committerJulien de Kozak <jdekozak@hotmail.com>
Sat, 30 Mar 2013 17:09:40 +0000 (18:09 +0100)
18 files changed:
gtk2_ardour/canvas-waveview.c
gtk2_ardour/canvas-waveview.h
gtk2_ardour/tempo_lines.cc
libs/ardour/lv2_plugin.cc
libs/clearlooks-newer/animation.c
libs/clearlooks-newer/animation.h
libs/clearlooks-newer/clearlooks_draw.c
libs/clearlooks-newer/clearlooks_draw_glossy.c
libs/clearlooks-newer/clearlooks_draw_gummy.c
libs/clearlooks-newer/clearlooks_draw_inverted.c
libs/clearlooks-newer/clearlooks_style.c
libs/gtkmm2ext/barcontroller.cc
libs/gtkmm2ext/gtkapplication_x11.c
libs/gtkmm2ext/gtkmm2ext/gtkapplication.h
libs/gtkmm2ext/prolooks_helpers.c
libs/pbd/pbd/fastlog.h
libs/pbd/xml++.cc
libs/surfaces/mackie/strip.h

index 108952454a0f574379e23f308f6917020fa7701e..2080b208d8a2eb6f839cc0657bf3c72e58d6a98c 100644 (file)
@@ -39,7 +39,7 @@
 #define POSIX_FUNC_PTR_CAST(type, object) *((type*) &(object))
 #endif // _POSIX_VERSION
 
-extern void c_stacktrace();
+extern void c_stacktrace(void);
 
 enum {
         PROP_0,
@@ -338,7 +338,7 @@ gnome_canvas_waveview_set_gradient_waveforms (int yn)
 }
 
 GnomeCanvasWaveViewCache*
-gnome_canvas_waveview_cache_new ()
+gnome_canvas_waveview_cache_new (void)
 {
        GnomeCanvasWaveViewCache *c;
 
index 9ece3f5425561f22cdeb819379f627d2537893c5..daa907e11047519a7e3f2dc31c12b4addd146d54 100644 (file)
@@ -61,7 +61,7 @@ struct _GnomeCanvasWaveViewCache
     gulong                        end;
 };
 
-GnomeCanvasWaveViewCache* gnome_canvas_waveview_cache_new ();
+GnomeCanvasWaveViewCache* gnome_canvas_waveview_cache_new (void);
 void                    gnome_canvas_waveview_cache_destroy (GnomeCanvasWaveViewCache*);
 
 void gnome_canvas_waveview_set_gradient_waveforms (int);
index 962acbd37d04ddf0c49960de838d7616955f0657..97aa662c38549779db1a67b9c38880c81a0469c8 100644 (file)
@@ -129,7 +129,6 @@ TempoLines::draw (const ARDOUR::TempoMap::BBTPointList::const_iterator& begin,
 
        //cout << endl << "*** LINE CACHE MISS" << endl;
 
-       bool inserted_last_time = true;
        bool invalidated = false;
 
        for (i = begin; i != end; ++i) {
@@ -162,7 +161,6 @@ TempoLines::draw (const ARDOUR::TempoMap::BBTPointList::const_iterator& begin,
                                ++li;
                        
                        line->property_color_rgba() = color;
-                       inserted_last_time = false; // don't search next time
                        // Use existing line, moving if necessary
                } else if (!exhausted) {
                        Lines::iterator steal = _lines.end();
@@ -178,7 +176,6 @@ TempoLines::draw (const ARDOUR::TempoMap::BBTPointList::const_iterator& begin,
                                line->property_x2() = xpos;
                                line->property_color_rgba() = color;
                                _lines.insert(make_pair(xpos, line));
-                               inserted_last_time = true; // search next time
                                invalidated = true;
                                
                                // Shift clean range left
@@ -192,7 +189,6 @@ TempoLines::draw (const ARDOUR::TempoMap::BBTPointList::const_iterator& begin,
                                        //cout << "*** EXISTING LINE" << endl;
                                        li = existing;
                                        li->second->property_color_rgba() = color;
-                                       inserted_last_time = false; // don't search next time
                                } else {
                                        //cout << "*** MOVING LINE" << endl;
                                        const double x1 = line->property_x1();
@@ -206,7 +202,6 @@ TempoLines::draw (const ARDOUR::TempoMap::BBTPointList::const_iterator& begin,
                                        line->property_x1() = xpos;
                                        line->property_x2() = xpos;
                                        _lines.insert(make_pair(xpos, line));
-                                       inserted_last_time = true; // search next time
                                }
                        }
                        
@@ -222,7 +217,6 @@ TempoLines::draw (const ARDOUR::TempoMap::BBTPointList::const_iterator& begin,
                                line->property_y2() = _height;
                                line->property_color_rgba() = color;
                                _lines.insert(make_pair(xpos, line));
-                               inserted_last_time = true;
                        }
                        
                        // Steal from the left
@@ -237,7 +231,6 @@ TempoLines::draw (const ARDOUR::TempoMap::BBTPointList::const_iterator& begin,
                                line->property_x1() = xpos;
                                line->property_x2() = xpos;
                                _lines.insert(make_pair(xpos, line));
-                               inserted_last_time = true; // search next time
                                invalidated = true;
                        
                                // Shift clean range right
index 29af02c696221e5b2150ba0a1f2658549d792bc2..c900a21176b97efd8803f05399af9ac635908125 100644 (file)
@@ -1570,7 +1570,6 @@ LV2Plugin::connect_and_run(BufferSet& bufs,
                                        : m;
 
                                // Now merge MIDI and any transport events into the buffer
-                               LV2_Evbuf_Iterator i    = lv2_evbuf_end(_ev_buffers[port_index]);
                                const uint32_t     type = LV2Plugin::urids.midi_MidiEvent;
                                const framepos_t   tend = _session.transport_frame() + nframes;
                                ++metric_i;
index 24766aa907a2158c5d89baffe80ddaeedd7d0c89..2c6a6fdc420312336ffce220441d5c67b679c03e 100644 (file)
@@ -63,7 +63,7 @@ force_widget_redraw (GtkWidget *widget)
 
 /* ensures that the timer is running */
 static void
-start_timer ()
+start_timer (void)
 {
        if (animation_timer_id == 0)
                animation_timer_id = g_timeout_add (ANIMATION_DELAY, animation_timeout_handler, NULL);
@@ -71,7 +71,7 @@ start_timer ()
 
 /* ensures that the timer is stopped */
 static void
-stop_timer ()
+stop_timer (void)
 {
        if (animation_timer_id != 0)
        {
@@ -243,7 +243,7 @@ on_connected_widget_destruction (gpointer data, GObject *widget)
 }
 
 static void
-disconnect_all_signals ()
+disconnect_all_signals (void)
 {
        GSList * item = connected_widgets;
        while (item != NULL)
@@ -265,7 +265,7 @@ disconnect_all_signals ()
 static gint
 find_signal_info (gconstpointer signal_info, gconstpointer widget)
 {
-       if (((SignalInfo*)signal_info)->widget == widget)
+       if (((const SignalInfo*)signal_info)->widget == widget)
                return 0;
        else
                return 1;
@@ -325,7 +325,7 @@ clearlooks_animation_elapsed (gpointer data)
 
 /* cleans up all resources of the animation system */
 void
-clearlooks_animation_cleanup ()
+clearlooks_animation_cleanup (void)
 {
        disconnect_all_signals ();
        
index da70b6ce667bb2e366cf978154a463079d780379..dca70bc9a4d047919f7eefe6f459e8ef7c99ee82 100644 (file)
@@ -30,5 +30,5 @@ GE_INTERNAL void     clearlooks_animation_progressbar_add (GtkWidget *progressba
 GE_INTERNAL void     clearlooks_animation_connect_checkbox (GtkWidget *widget);
 GE_INTERNAL gboolean clearlooks_animation_is_animated (GtkWidget *widget);
 GE_INTERNAL gdouble  clearlooks_animation_elapsed (gpointer data);
-GE_INTERNAL void     clearlooks_animation_cleanup ();
+GE_INTERNAL void     clearlooks_animation_cleanup (void);
 #endif /* HAVE_ANIMATION */
index 167c458dd9dd2204b7f0c9f5cbe419b1f90b31b9..e44610b4ee5e597e6c5f0d1133960a6bc0206322 100644 (file)
@@ -1088,7 +1088,7 @@ clearlooks_draw_frame            (cairo_t *cr,
                                   int x, int y, int width, int height)
 {
        const CairoColor *border = frame->border;
-       const CairoColor *dark   = (CairoColor*)&colors->shade[4];
+       const CairoColor *dark   = (const CairoColor*)&colors->shade[4];
        ClearlooksRectangle bevel_clip = {0, 0, 0, 0};
        ClearlooksRectangle frame_clip = {0, 0, 0, 0};
        double radius = MIN (params->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0));
@@ -1623,7 +1623,6 @@ clearlooks_draw_scrollbar_stepper (cairo_t *cr,
        CairoColor   border;
        CairoColor   s1, s2, s3, s4;
        cairo_pattern_t *pattern;
-       ShadowParameters shadow;
        double radius = MIN (widget->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0));
 
        ge_shade_color(&colors->shade[6], 1.05, &border);
@@ -1675,12 +1674,6 @@ clearlooks_draw_scrollbar_stepper (cairo_t *cr,
        cairo_stroke (cr);
        
        cairo_translate (cr, 0.5, 0.5);
-       shadow.shadow  = CL_SHADOW_OUT;
-       shadow.corners = corners;
-       /*
-       clearlooks_draw_highlight_and_shade (cr, &shadow,
-                                            width,
-                                            height, params->radius);*/
 }
 
 static void
@@ -1892,17 +1885,14 @@ clearlooks_draw_handle (cairo_t *cr,
 {
        const CairoColor *fill  = &colors->bg[params->state_type];
        int num_bars = 6; /* shut up gcc warnings */
-       int bar_spacing;
        
        switch (handle->type)
        {
                case CL_HANDLE_TOOLBAR:
                        num_bars    = 6;
-                       bar_spacing = 3;
                break;
                case CL_HANDLE_SPLITTER:
                        num_bars    = 16;
-                       bar_spacing = 3;
                break;
        }
 
index 400851dfa1c27a98022e75d8b439767f15cc1af3..62f17f3f950e97e23e8033403070f524e12e8d29 100644 (file)
@@ -688,7 +688,6 @@ clearlooks_glossy_draw_tab (cairo_t *cr,
        cairo_pattern_t     *pattern;
        
        double               radius;
-       double               strip_size;
 
        radius = MIN (params->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0));
 
@@ -707,7 +706,6 @@ clearlooks_glossy_draw_tab (cairo_t *cr,
        if (tab->gap_side == CL_GAP_TOP || tab->gap_side == CL_GAP_BOTTOM)
        {
                height += 3.0;
-               strip_size = 2.0/height; /* 2 pixel high strip */
                
                if (tab->gap_side == CL_GAP_TOP)
                        cairo_translate (cr, 0.0, -3.0); /* gap at the other side */
@@ -715,7 +713,6 @@ clearlooks_glossy_draw_tab (cairo_t *cr,
        else
        {
                width += 3.0;
-               strip_size = 2.0/width;
                
                if (tab->gap_side == CL_GAP_LEFT) 
                        cairo_translate (cr, -3.0, 0.0); /* gap at the other side */
@@ -893,7 +890,6 @@ clearlooks_glossy_draw_scrollbar_stepper (cairo_t *cr,
        const CairoColor *border = &colors->shade[7];
        CairoColor  fill, s1, s2, s4;
        cairo_pattern_t *pattern;
-       ShadowParameters shadow;
        double radius = MIN (widget->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0));
        
        if (scrollbar->horizontal)
@@ -944,8 +940,6 @@ clearlooks_glossy_draw_scrollbar_stepper (cairo_t *cr,
        cairo_stroke (cr);
        
        cairo_translate (cr, 0.5, 0.5);
-       shadow.shadow  = CL_SHADOW_OUT;
-       shadow.corners = corners;
 }
 
 static void
index b57cf24fdf9cb70c6e60b79077841b0a559add1e..0d736b5acc4c0d933604e5041022ff87e7fee4c4 100644 (file)
@@ -665,7 +665,6 @@ clearlooks_gummy_draw_tab (cairo_t                *cr,
        cairo_pattern_t     *pattern;
 
        double               radius;
-       double               strip_size;
 
        radius = MIN (params->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0));
 
@@ -683,7 +682,6 @@ clearlooks_gummy_draw_tab (cairo_t                *cr,
        if (tab->gap_side == CL_GAP_TOP || tab->gap_side == CL_GAP_BOTTOM)
        {
                height += 3.0;
-               strip_size = 2.0/height; /* 2 pixel high strip */
 
                if (tab->gap_side == CL_GAP_TOP)
                        cairo_translate (cr, 0.0, -3.0); /* gap at the other side */
@@ -691,7 +689,6 @@ clearlooks_gummy_draw_tab (cairo_t                *cr,
        else
        {
                width += 3.0;
-               strip_size = 2.0/width;
 
                if (tab->gap_side == CL_GAP_LEFT) 
                        cairo_translate (cr, -3.0, 0.0); /* gap at the other side */
@@ -927,7 +924,6 @@ clearlooks_gummy_draw_scrollbar_stepper (cairo_t                          *cr,
        CairoColor fill;
        CairoColor shade1, shade2, shade3;
        cairo_pattern_t *pattern;
-       ShadowParameters shadow;
        double radius = MIN (widget->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0));
 
        if (scrollbar->horizontal)
@@ -977,8 +973,6 @@ clearlooks_gummy_draw_scrollbar_stepper (cairo_t                          *cr,
        cairo_stroke (cr);
 
        cairo_translate (cr, 0.5, 0.5);
-       shadow.shadow  = CL_SHADOW_OUT;
-       shadow.corners = corners;
 }
 
 static void
index 2e8ee3bcd76e54c8b2d23a263ee9fd14abea0aa2..017c39d714f313eb338760170fea4f5fe22c9da5 100644 (file)
@@ -394,7 +394,7 @@ clearlooks_inverted_draw_menubaritem (cairo_t *cr,
                           const WidgetParameters          *widget,
                           int x, int y, int width, int height)
 {
-       CairoColor *fill = (CairoColor*)&colors->spot[1];
+       const CairoColor *fill = &colors->spot[1];
        CairoColor fill_shade;
        CairoColor border = colors->spot[2];
        cairo_pattern_t *pattern;
@@ -481,19 +481,6 @@ clearlooks_inverted_draw_tab (cairo_t *cr,
 
        ge_shade_color (fill, 1.3, &hilight);
 
-       /* Draw highlight */
-       if (!params->active)
-       {
-               ShadowParameters shadow;
-               
-               shadow.shadow  = CL_SHADOW_OUT;
-               shadow.corners = params->corners;
-               /*
-               clearlooks_draw_highlight_and_shade (cr, colors, &shadow,
-                                                    width,
-                                                    height, radius);*/
-       }
-       
        if (params->active)
        {
                pattern = cairo_pattern_create_linear ( tab->gap_side == CL_GAP_LEFT   ? width-1  : 0,
@@ -761,7 +748,6 @@ clearlooks_inverted_draw_scrollbar_stepper (cairo_t *cr,
        CairoColor border;
        CairoColor s1, s2, s3;
        cairo_pattern_t *pattern;
-       ShadowParameters shadow;
        double radius = MIN (widget->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0));
        
        ge_shade_color(&colors->shade[6], 1.05, &border);
@@ -808,12 +794,6 @@ clearlooks_inverted_draw_scrollbar_stepper (cairo_t *cr,
        cairo_stroke (cr);
        
        cairo_translate (cr, 0.5, 0.5);
-       shadow.shadow  = CL_SHADOW_OUT;
-       shadow.corners = corners;
-       /*
-       clearlooks_draw_highlight_and_shade (cr, &shadow,
-                                            width,
-                                            height, params->radius);*/
 }
 
 static void
index eafb2d2ec16d78e68a0ea532d28888608f868844..f1b46a54268b34c97e00e0e6100b6d8b01748aa6 100644 (file)
@@ -536,7 +536,6 @@ clearlooks_style_draw_box (DRAW_ARGS)
        else if (DETAIL ("button") || DETAIL ("buttondefault"))
        {
                WidgetParameters params;
-               ShadowParameters shadow = { CR_CORNER_ALL, CL_SHADOW_NONE } ;
                clearlooks_set_widget_parameters (widget, style, state_type, &params);
 
                if (ge_is_in_combo_box(widget))
@@ -545,23 +544,21 @@ clearlooks_style_draw_box (DRAW_ARGS)
                                params.corners = CR_CORNER_TOPRIGHT | CR_CORNER_BOTTOMRIGHT;
                        else
                                params.corners = CR_CORNER_TOPLEFT | CR_CORNER_BOTTOMLEFT;
-                       
-                       shadow.shadow = CL_SHADOW_IN;
 
                        if (params.xthickness > 2)
                        {
                                if (params.ltr)
                                        x--;
                                width++;
-                       }                       
+                       }
                }
                else
                {
                        params.corners    = CR_CORNER_ALL;
                        /* if (!(ge_is_combo_box (widget, FALSE))) */
                        params.enable_glow = TRUE;
-               }               
-       
+               }
+
                if (GE_IS_TOGGLE_BUTTON (widget) &&
                    gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
                        params.active = TRUE;
index 3afd0a98b939ca5c3c6e462241424075cc98280f..50c21e57e7016ca5de2c786d304ff54cdb8d9b7c 100644 (file)
@@ -313,7 +313,7 @@ BarController::expose (GdkEventExpose* /*event*/)
 
        Gdk::Color c;
        Widget* parent;
-       gint x1=0, x2=0, y1=0, y2=0;
+       gint x1=0, x2=0, y2=0;
        gint w, h;
        double fract, radius;
     float r, g, b;
@@ -327,7 +327,6 @@ BarController::expose (GdkEventExpose* /*event*/)
                h = darea.get_height();
                x1 = (gint) floor (w * fract);
                x2 = x1;
-               y1 = 0;
                y2 = h - 1;
 
                if (use_parent) {
index 8ab590fb54d23e2f1d42b7a3052e0912cf09e1ea..78d538b334bf020425e35f29beedceffb3ec91ef 100644 (file)
 #include <gtkmm2ext/gtkapplication.h>
 
 int  
-gtk_application_init ()
+gtk_application_init (void)
 {
        return 0;
 }
 
-void gtk_application_cleanup ()
+void gtk_application_cleanup (void)
 {
 }
 
@@ -44,6 +44,6 @@ gtk_application_add_app_menu_item (GtkApplicationMenuGroup* group, GtkMenuItem*
 }
 
 void
-gtk_application_ready ()
+gtk_application_ready (void)
 {
 }
index 68b7bd7a9fed91e7ef4219602cde5b90319bf2e8..d0d5b55557ae3fadec6ded12eba31435103f18a3 100644 (file)
@@ -30,9 +30,9 @@ G_BEGIN_DECLS
 
 typedef struct _GtkApplicationMenuGroup GtkApplicationMenuGroup;
 
-int  gtk_application_init ();
-void gtk_application_ready ();
-void gtk_application_cleanup ();
+int  gtk_application_init (void);
+void gtk_application_ready (void);
+void gtk_application_cleanup (void);
 
 void                      gtk_application_set_menu_bar       (GtkMenuShell    *menu_shell);
 GtkApplicationMenuGroup * gtk_application_add_app_menu_group (void);
index 511c15eee3ec5edc865998bd4e9925a8cc56ea31..d93be2d1581201ea9fc4ec6749afcb3894d4950b 100644 (file)
@@ -534,12 +534,8 @@ CairoColor* prolooks_hsl_to_cairo_color (ProlooksHSL* self) {
        CairoColor* result = NULL;
        gint i = 0;
        double* _tmp0_;
-       gint _hue_shift_size_;
-       gint hue_shift_length1;
        double* hue_shift;
        double* _tmp1_;
-       gint _color_shift_size_;
-       gint color_shift_length1;
        double* color_shift;
        double m1 = 0.0;
        double m2 = 0.0;
@@ -547,8 +543,8 @@ CairoColor* prolooks_hsl_to_cairo_color (ProlooksHSL* self) {
        gint _tmp2_ = 0;
        CairoColor* color;
        g_return_val_if_fail (self != NULL, NULL);
-       hue_shift = (_tmp0_ = g_new0 (double, 3), hue_shift_length1 = 3, _hue_shift_size_ = hue_shift_length1, _tmp0_);
-       color_shift = (_tmp1_ = g_new0 (double, 3), color_shift_length1 = 3, _color_shift_size_ = color_shift_length1, _tmp1_);
+       hue_shift = (_tmp0_ = g_new0 (double, 3), _tmp0_);
+       color_shift = (_tmp1_ = g_new0 (double, 3), _tmp1_);
        if (self->priv->_lightness <= 0.5) {
                m2 = self->priv->_lightness * (1 + self->priv->_saturation);
        } else {
@@ -944,7 +940,6 @@ CairoColor* prolooks_hsv_to_cairo_color (ProlooksHSV* self) {
        double r;
        double g;
        double b;
-       double v;
        gint hi = 0;
        double f = 0.0;
        double p = 0.0;
@@ -955,7 +950,6 @@ CairoColor* prolooks_hsv_to_cairo_color (ProlooksHSV* self) {
        r = 0.0;
        g = 0.0;
        b = 0.0;
-       v = self->priv->_value;
        hi = (gint) prolooks_modula (floor (self->priv->_hue / 60.0), (double) 6);
        f = (self->priv->_hue / 60.0) - floor (self->priv->_hue / 60.0);
        p = self->priv->_value * (1.0 - self->priv->_saturation);
@@ -1330,15 +1324,13 @@ void prolooks_shade_color (const GdkColor* orig, double shade_ratio, GdkColor* r
 GdkPixbuf* prolooks_cairo_image_surface_to_pixbuf (cairo_surface_t* surface) {
        GdkPixbuf* result = NULL;
        guchar* _tmp0_;
-       gint _knob_data_size_;
-       gint knob_data_length1;
        guchar* knob_data;
        g_return_val_if_fail (surface != NULL, NULL);
        if (cairo_image_surface_get_format (surface) != CAIRO_FORMAT_ARGB32) {
                result = NULL;
                return result;
        }
-       knob_data = (_tmp0_ = cairo_image_surface_get_data (surface), knob_data_length1 = -1, _knob_data_size_ = knob_data_length1, _tmp0_);
+       knob_data = (_tmp0_ = cairo_image_surface_get_data (surface), _tmp0_);
        {
                gint i;
                i = 0;
index 4269705a44537a76a06a655414ffeead48362b14..9897da773a497bf97f73328a6abc65906a9c0a26 100644 (file)
@@ -35,6 +35,6 @@ static inline float fast_log10 (const float val)
        return fast_log2(val) / 3.312500f;
 }
 
-static inline float minus_infinity() { return -HUGE_VAL; }
+static inline float minus_infinity(void) { return -HUGE_VAL; }
 
 #endif /* __pbd_fastlog_h__ */
index 6554bed9ee12c7e02812297f2251d79ef69b8fe3..a1fa77db660b53c3ec40f1871406b863b4747a76 100644 (file)
@@ -11,7 +11,7 @@
 #include <libxml/xpath.h>
 #include <libxml/xpathInternals.h>
 
-#define XML_VERSION "1.0"
+xmlChar* xml_version = xmlCharStrdup("1.0");
 
 using namespace std;
 
@@ -151,7 +151,7 @@ XMLTree::write() const
        int result;
 
        xmlKeepBlanksDefault(0);
-       doc = xmlNewDoc((xmlChar*) XML_VERSION);
+       doc = xmlNewDoc(xml_version);
        xmlSetDocCompressMode(doc, _compression);
        writenode(doc, _root, doc->children, 1);
        result = xmlSaveFormatFileEnc(_filename.c_str(), doc, "UTF-8", 1);
@@ -171,7 +171,7 @@ XMLTree::debug(FILE* out) const
        XMLNodeList children;
 
        xmlKeepBlanksDefault(0);
-       doc = xmlNewDoc((xmlChar*) XML_VERSION);
+       doc = xmlNewDoc(xml_version);
        xmlSetDocCompressMode(doc, _compression);
        writenode(doc, _root, doc->children, 1);
        xmlDebugDumpDocument (out, doc);
@@ -188,7 +188,7 @@ XMLTree::write_buffer() const
        XMLNodeList children;
 
        xmlKeepBlanksDefault(0);
-       doc = xmlNewDoc((xmlChar*) XML_VERSION);
+       doc = xmlNewDoc(xml_version);
        xmlSetDocCompressMode(doc, _compression);
        writenode(doc, _root, doc->children, 1);
        xmlDocDumpMemory(doc, (xmlChar **) & ptr, &len);
@@ -358,7 +358,7 @@ XMLTree::find(const string xpath, XMLNode* node) const
        xmlDocPtr doc = 0;
 
        if (node) {
-               doc = xmlNewDoc((xmlChar*) XML_VERSION);
+               doc = xmlNewDoc(xml_version);
                writenode(doc, node, doc->children, 1);
                ctxt = xmlXPathNewContext(doc);
        } else {
@@ -556,7 +556,7 @@ readnode(xmlNodePtr node)
        xmlAttrPtr attr;
 
        if (node->name) {
-               name = (char*)node->name;
+               name = (const char*)node->name;
        }
 
        tmp = new XMLNode(name);
@@ -566,7 +566,7 @@ readnode(xmlNodePtr node)
                if (attr->children) {
                        content = (char*)attr->children->content;
                }
-               tmp->add_property((char*)attr->name, content);
+               tmp->add_property((const char*)attr->name, content);
        }
 
        if (node->content) {
@@ -592,9 +592,9 @@ writenode(xmlDocPtr doc, XMLNode* n, xmlNodePtr p, int root = 0)
        xmlNodePtr node;
 
        if (root) {
-               node = doc->children = xmlNewDocNode(doc, 0, (xmlChar*) n->name().c_str(), 0);
+               node = doc->children = xmlNewDocNode(doc, 0, (const xmlChar*) n->name().c_str(), 0);
        } else {
-               node = xmlNewChild(p, 0, (xmlChar*) n->name().c_str(), 0);
+               node = xmlNewChild(p, 0, (const xmlChar*) n->name().c_str(), 0);
        }
 
        if (n->is_content()) {
@@ -604,7 +604,7 @@ writenode(xmlDocPtr doc, XMLNode* n, xmlNodePtr p, int root = 0)
 
        props = n->properties();
        for (curprop = props.begin(); curprop != props.end(); ++curprop) {
-               xmlSetProp(node, (xmlChar*) (*curprop)->name().c_str(), (xmlChar*) (*curprop)->value().c_str());
+               xmlSetProp(node, (const xmlChar*) (*curprop)->name().c_str(), (const xmlChar*) (*curprop)->value().c_str());
        }
 
        children = n->children();
index d5fdc6c17c5917b82f0f8fb3cf4be23d9588eb22..225783d0fe36b28e6eb7f73f96959116d20adfce 100644 (file)
@@ -33,15 +33,9 @@ class Fader;
 class Meter;
 class SurfacePort;
 
-struct StripControlDefinition {
-    const char* name;
-    uint32_t base_id;
-    Control* (*factory)(Surface&, int index, const char* name, Group&);
-};
-
 struct GlobalControlDefinition {
     const char* name;
-    uint32_t id;
+    int id;
     Control* (*factory)(Surface&, int index, const char* name, Group&);
     const char* group_name;
 };