Fix some compiler warnings.
authorCarl Hetherington <carl@carlh.net>
Tue, 6 Oct 2009 23:58:29 +0000 (23:58 +0000)
committerCarl Hetherington <carl@carlh.net>
Tue, 6 Oct 2009 23:58:29 +0000 (23:58 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@5746 d708f5d6-7413-0410-9779-e7cbd77b26cf

13 files changed:
gtk2_ardour/midi_region_view.cc
gtk2_ardour/panner_ui.cc
gtk2_ardour/plugin_ui.h
libs/ardour/import.cc
libs/clearlooks-newer/animation.c
libs/clearlooks-newer/cairo-support.c
libs/clearlooks-newer/clearlooks_draw.c
libs/clearlooks-newer/clearlooks_draw_glossy.c
libs/clearlooks-newer/clearlooks_draw_gummy.c
libs/clearlooks-newer/clearlooks_rc_style.c
libs/clearlooks-newer/clearlooks_style.c
libs/pbd/pbd/abstract_ui.cc
libs/surfaces/mackie/mackie_midi_builder.cc

index e7b70d29de8c3c70ce885a3ca7ce5f8dfb303f18..e9bffa13218ba97791a1817454175635033b3493 100644 (file)
@@ -1678,7 +1678,7 @@ MidiRegionView::move_selection(double dx, double dy)
 }
 
 void
-MidiRegionView::note_dropped(CanvasNoteEvent* ev, double dt, int8_t dnote)
+MidiRegionView::note_dropped(CanvasNoteEvent *, double dt, int8_t dnote)
 {
        assert (!_selection.empty());
 
@@ -1705,7 +1705,7 @@ MidiRegionView::note_dropped(CanvasNoteEvent* ev, double dt, int8_t dnote)
        */
 
        // Make sure the note pitch does not exceed the MIDI standard range
-       if (dnote <= 127 && (highest_note_in_selection + dnote > 127)) {
+       if (highest_note_in_selection + dnote > 127) {
                highest_note_difference = highest_note_in_selection - 127;
        }
        
index c04ca055b26f1d599bcd78bab761c3911ed1d6de..cb1ee82508a5781fef4e30f1d522bb0c9db37e73 100644 (file)
@@ -342,7 +342,7 @@ PannerUI::setup_pan ()
 
        uint32_t nouts = _panner->nouts();
 
-       if (nouts == _current_nouts) {
+       if (int32_t (nouts) == _current_nouts) {
                return;
        }
 
index 69ca650b009108a84594763792b108ae692576dd..91e93dcae00cae0f835d4c2cf0a25a0e517f7acf 100644 (file)
@@ -90,7 +90,7 @@ class PlugUIBase : public virtual sigc::trackable
 
        void latency_button_clicked ();
 
-       virtual bool on_window_show(const Glib::ustring& title) { return true; }
+       virtual bool on_window_show(const Glib::ustring& /*title*/) { return true; }
        virtual void on_window_hide() {}
 
   protected:
index 23ad3a23ad91981ce9ef4ef68d761061112a6141..f98e42d051f86f20115be674c5d45a8d481140f6 100644 (file)
@@ -212,7 +212,7 @@ map_existing_mono_sources (const vector<string>& new_paths, Session& /*sess*/,
 static bool
 create_mono_sources_for_writing (const vector<string>& new_paths, Session& sess,
                                 uint samplerate, vector<boost::shared_ptr<Source> >& newfiles,
-                                nframes64_t timeline_position)
+                                nframes64_t /*timeline_position*/)
 {
        for (vector<string>::const_iterator i = new_paths.begin();
                        i != new_paths.end(); ++i)
index 82af498949e0e16c8f9e3f05c62e224e229f28f7..e6ac9fa3a44f96ce504e2f68c99b9de940c0983c 100644 (file)
@@ -159,6 +159,8 @@ add_animation (const GtkWidget *widget, gdouble stop_time)
 static gboolean
 update_animation_info (gpointer key, gpointer value, gpointer user_data)
 {
+       (void) user_data;
+       
        AnimationInfo *animation_info = value;
        GtkWidget *widget = key;
        
@@ -193,6 +195,8 @@ update_animation_info (gpointer key, gpointer value, gpointer user_data)
 static gboolean
 animation_timeout_handler (gpointer data)
 {
+       (void) data;
+       
        /*g_print("** TICK **\n");*/
        
        /* enter threads as update_animation_info will use gtk/gdk. */
@@ -213,6 +217,8 @@ animation_timeout_handler (gpointer data)
 static void
 on_checkbox_toggle (GtkWidget *widget, gpointer data)
 {
+       (void) data;
+       
        AnimationInfo *animation_info = lookup_animation_info (widget);
        
        if (animation_info != NULL)
@@ -230,6 +236,8 @@ on_checkbox_toggle (GtkWidget *widget, gpointer data)
 static void
 on_connected_widget_destruction (gpointer data, GObject *widget)
 {
+       (void) widget;
+       
        connected_widgets = g_slist_remove (connected_widgets, data);
        g_free (data);
 }
index dbe6fd3d346454633671984f5bab748bd44d9569..63245f48330483b68e8382734fc29fb08a397196 100644 (file)
@@ -809,7 +809,9 @@ GE_EXPORT const gchar* g_module_check_init (GModule *module);
 const gchar*
 g_module_check_init (GModule *module)
 {
-  return gtk_check_version (GTK_MAJOR_VERSION,
-                           GTK_MINOR_VERSION,
-                           GTK_MICRO_VERSION - GTK_INTERFACE_AGE);
+       (void) module;
+       
+       return gtk_check_version (GTK_MAJOR_VERSION,
+                                 GTK_MINOR_VERSION,
+                                 GTK_MICRO_VERSION - GTK_INTERFACE_AGE);
 }
index 614317ea3bb5e2caac6df9865cc5f9fd74719f79..c614e90918c3293cb54070273cfbf4ee0009b958 100644 (file)
 #include <ge-support.h>
 #include <math.h>
 
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
 #include <cairo.h>
 
 typedef void (*menubar_draw_proto) (cairo_t *cr,
@@ -918,6 +922,8 @@ clearlooks_draw_menu_item_separator (cairo_t                   *cr,
                                      const SeparatorParameters *separator,
                                      int x, int y, int width, int height)
 {
+       (void) widget;
+       
        cairo_save (cr);
        cairo_set_line_cap (cr, CAIRO_LINE_CAP_BUTT);
        ge_cairo_set_color (cr, &colors->shade[5]);
@@ -939,6 +945,9 @@ clearlooks_draw_menubar0 (cairo_t *cr,
                           const MenuBarParameters *menubar,
                           int x, int y, int width, int height)
 {
+       (void) params;
+       (void) menubar;
+       
 /*     const CairoColor *light = &colors->shade[0]; */
        const CairoColor *dark = &colors->shade[3];
 
@@ -963,6 +972,9 @@ clearlooks_draw_menubar2 (cairo_t *cr,
                           const MenuBarParameters *menubar,
                           int x, int y, int width, int height)
 {
+       (void) params;
+       (void) menubar;
+       
        CairoColor lower;
        cairo_pattern_t *pattern;
 
@@ -1035,6 +1047,9 @@ clearlooks_get_frame_gap_clip (int x, int y, int width, int height,
                                ClearlooksRectangle *bevel,
                                ClearlooksRectangle *border)
 {
+       (void) x;
+       (void) y;
+       
        if (frame->gap_side == CL_GAP_TOP)
        {
                CLEARLOOKS_RECTANGLE_SET ((*bevel),  1.5 + frame->gap_x,  -0.5,
@@ -1301,6 +1316,8 @@ clearlooks_draw_separator (cairo_t *cr,
                            const SeparatorParameters  *separator,
                            int x, int y, int width, int height)
 {
+       (void) widget;
+       
        CairoColor color = colors->shade[3];
        CairoColor hilight; 
        ge_shade_color (&color, 1.4, &hilight);
@@ -1415,6 +1432,8 @@ clearlooks_draw_toolbar (cairo_t *cr,
                          const ToolbarParameters         *toolbar,
                          int x, int y, int width, int height)
 {
+       (void) widget;
+
        const CairoColor *fill  = &colors->bg[GTK_STATE_NORMAL];
        const CairoColor *dark  = &colors->shade[3];
        CairoColor light;
@@ -1556,6 +1575,8 @@ clearlooks_draw_scrollbar_trough (cairo_t *cr,
                                   const ScrollBarParameters        *scrollbar,
                                   int x, int y, int width, int height)
 {
+       (void) widget;
+
        const CairoColor *bg     = &colors->shade[2];
        const CairoColor *border = &colors->shade[5];
        CairoColor        bg_shade;
@@ -1795,6 +1816,9 @@ clearlooks_draw_statusbar (cairo_t *cr,
                            const WidgetParameters          *widget,
                            int x, int y, int width, int height)
 {
+       (void) widget;
+       (void) height;
+       
        const CairoColor *dark = &colors->shade[3];
        CairoColor hilight;
 
@@ -1820,6 +1844,8 @@ clearlooks_draw_menu_frame (cairo_t *cr,
                             const WidgetParameters          *widget,
                             int x, int y, int width, int height)
 {
+       (void) widget;
+
        const CairoColor *border = &colors->shade[5];
        cairo_translate      (cr, x, y);
        cairo_set_line_width (cr, 1);
@@ -1908,6 +1934,8 @@ clearlooks_draw_resize_grip (cairo_t *cr,
                              const ResizeGripParameters      *grip,
                              int x, int y, int width, int height)
 {
+       (void) widget;
+       
        const CairoColor *dark   = &colors->shade[4];
        CairoColor hilight;
        int lx, ly;
@@ -1978,6 +2006,9 @@ clearlooks_draw_radiobutton (cairo_t *cr,
                              const CheckboxParameters *checkbox,
                              int x, int y, int width, int height)
 {
+       (void) width;
+       (void) height;
+       
        const CairoColor *border;
        const CairoColor *dot;
        CairoColor shadow;
index 8a5921efc2139f89a3e127122cd8abc8bd03359f..400851dfa1c27a98022e75d8b439767f15cc1af3 100644 (file)
@@ -33,6 +33,9 @@
 
 #include <cairo.h>
 
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
 
 static void
 clearlooks_draw_glossy_gradient (cairo_t         *cr,
@@ -292,12 +295,13 @@ clearlooks_glossy_draw_button (cairo_t *cr,
                }
                
                /* if (!(params->enable_glow && !params->active && !params->disabled)) */
-               if (!(params->prelight && params->enable_glow && !params->active))
+               if (!(params->prelight && params->enable_glow && !params->active)) {
                        if (!(params->disabled))
                                params->style_functions->draw_inset (cr, &params->parentbg, 0, 0, width-1, height-1, params->radius+1, params->corners);
                        else
                                /*Draw a lighter inset */
                                clearlooks_glossy_draw_light_inset (cr, &params->parentbg, 0, 0, width-1, height-1, params->radius+1, params->corners);
+               }
                cairo_translate (cr, -0.5, -0.5);
        }
 
@@ -1090,6 +1094,10 @@ clearlooks_glossy_draw_toolbar (cairo_t *cr,
                          const ToolbarParameters         *toolbar,
                          int x, int y, int width, int height)
 {
+       (void) widget;
+       (void) width;
+       (void) height;
+       
        const CairoColor *fill  = &colors->bg[GTK_STATE_NORMAL];
        const CairoColor *dark  = &colors->shade[3];
        CairoColor light;
@@ -1230,6 +1238,9 @@ clearlooks_glossy_draw_radiobutton (cairo_t *cr,
                              const CheckboxParameters *checkbox,
                              int x, int y, int width, int height)
 {
+       (void) width;
+       (void) height;
+       
        const CairoColor *border;
        const CairoColor *dot;
        CairoColor shadow;
index e2a990230bc0ea16049fe5ff1d22e7e0093c97fb..b57cf24fdf9cb70c6e60b79077841b0a559add1e 100644 (file)
@@ -793,6 +793,8 @@ clearlooks_gummy_draw_separator (cairo_t                   *cr,
                                  const SeparatorParameters *separator,
                                  int x, int y, int width, int height)
 {
+       (void) widget;
+       
        CairoColor color = colors->shade[3];
        CairoColor hilight;
        ge_shade_color (&color, 1.3, &hilight);
@@ -1166,6 +1168,8 @@ clearlooks_gummy_draw_toolbar (cairo_t                 *cr,
                                const ToolbarParameters *toolbar,
                                int x, int y, int width, int height)
 {
+       (void) widget;
+       
        const CairoColor *fill = &colors->bg[GTK_STATE_NORMAL];
        const CairoColor *dark = &colors->shade[3];
        CairoColor light;
@@ -1304,6 +1308,9 @@ clearlooks_gummy_draw_statusbar (cairo_t                *cr,
                                  const WidgetParameters *widget,
                                  int x, int y, int width, int height)
 {
+       (void) widget;
+       (void) height;
+
        const CairoColor *dark = &colors->shade[3];
        CairoColor hilight;
 
@@ -1330,6 +1337,9 @@ clearlooks_gummy_draw_radiobutton (cairo_t                  *cr,
                                    const CheckboxParameters *checkbox,
                                    int x, int y, int width, int height)
 {
+       (void) width;
+       (void) height;
+       
        const CairoColor *border;
        const CairoColor *dot;
        CairoColor shadow;
index f486453339c31bb77006d1153b4d128f0e7eb4c0..c9a30ff6b4877f9d5e9d4ba16cbc92bcc8cff589 100644 (file)
@@ -173,6 +173,8 @@ clearlooks_gtk2_rc_parse_boolean (GtkSettings *settings,
                      GScanner     *scanner,
                      gboolean *retval)
 {
+       (void) settings;
+       
        guint token;
        token = g_scanner_get_next_token(scanner);
 
@@ -196,6 +198,8 @@ clearlooks_gtk2_rc_parse_color(GtkSettings  *settings,
                  GScanner     *scanner,
                  GdkColor     *color)
 {
+       (void) settings;
+       
        guint token;
 
        /* Skip 'blah_color' */
@@ -213,6 +217,8 @@ clearlooks_gtk2_rc_parse_double (GtkSettings  *settings,
                                  GScanner     *scanner,
                                  gdouble      *val)
 {
+       (void) settings;
+       
        guint token;
 
        /* Skip 'blah' */
@@ -236,6 +242,8 @@ clearlooks_gtk2_rc_parse_int (GtkSettings  *settings,
                         GScanner     *scanner,
                         guint8       *progressbarstyle)
 {
+       (void) settings;
+
        guint token;
 
        /* Skip 'sunkenmenubar' */
@@ -259,6 +267,8 @@ clearlooks_gtk2_rc_parse_style (GtkSettings      *settings,
                                 GScanner         *scanner,
                                 ClearlooksStyles *style)
 {
+       (void) settings;
+
        guint token;
 
        g_assert (CL_NUM_STYLES == CL_STYLE_GUMMY + 1); /* so that people don't forget ;-) */
@@ -298,6 +308,8 @@ clearlooks_gtk2_rc_parse_dummy (GtkSettings      *settings,
                                 GScanner         *scanner,
                                 gchar            *name)
 {
+       (void) settings;
+
        guint token;
 
        /* Skip option */
@@ -469,5 +481,7 @@ clearlooks_rc_style_merge (GtkRcStyle *dest,
 static GtkStyle *
 clearlooks_rc_style_create_style (GtkRcStyle *rc_style)
 {
+       (void) rc_style;
+       
        return GTK_STYLE (g_object_new (CLEARLOOKS_TYPE_STYLE, NULL));
 }
index 48b6647df382449690da0e3fa7d002cc9ea2d07c..eafb2d2ec16d78e68a0ea532d28888608f868844 100644 (file)
@@ -959,6 +959,8 @@ clearlooks_style_draw_slider (DRAW_ARGS, GtkOrientation orientation)
 static void
 clearlooks_style_draw_option (DRAW_ARGS)
 {
+       (void) detail;
+               
        ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style);
        const ClearlooksColors *colors;
        WidgetParameters params;
@@ -1020,6 +1022,10 @@ clearlooks_style_draw_vline (GtkStyle               *style,
                              gint                    y2,
                              gint                    x)
 {
+       (void) state_type;
+       (void) widget;
+       (void) detail;
+       
        ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style);
        const ClearlooksColors *colors;
        SeparatorParameters separator = { FALSE };
@@ -1050,6 +1056,9 @@ clearlooks_style_draw_hline (GtkStyle               *style,
                              gint                    x2,
                              gint                    y)
 {
+       (void) state_type;
+       (void) widget;
+       
        ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style);
        const ClearlooksColors *colors;
        cairo_t *cr;
@@ -1130,6 +1139,8 @@ clearlooks_style_draw_resize_grip (GtkStyle       *style,
                   gint            width,
                   gint            height)
 {
+       (void) detail;
+       
        ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style);
        ClearlooksColors *colors = &clearlooks_style->colors;
        cairo_t *cr;
@@ -1156,6 +1167,9 @@ clearlooks_style_draw_resize_grip (GtkStyle       *style,
 static void
 clearlooks_style_draw_tab (DRAW_ARGS)
 {
+       (void) shadow_type;
+       (void) detail;
+       
        ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style);
        ClearlooksColors *colors = &clearlooks_style->colors;
        WidgetParameters params;
@@ -1191,6 +1205,10 @@ clearlooks_style_draw_arrow (GtkStyle  *style,
                        gint           width,
                        gint           height)
 {
+       (void) shadow;
+       (void) detail;
+       (void) fill;
+       
        ClearlooksStyle  *clearlooks_style = CLEARLOOKS_STYLE (style);
        ClearlooksColors *colors = &clearlooks_style->colors;
        WidgetParameters params;
@@ -1238,7 +1256,7 @@ clearlooks_style_init_from_rc (GtkStyle * style,
        
        clearlooks_parent_class->init_from_rc (style, rc_style);
        
-       g_assert ((CLEARLOOKS_RC_STYLE (rc_style)->style >= 0) && (CLEARLOOKS_RC_STYLE (rc_style)->style < CL_NUM_STYLES));
+       g_assert ((CLEARLOOKS_RC_STYLE (rc_style)->style < CL_NUM_STYLES));
        clearlooks_style->style         = CLEARLOOKS_RC_STYLE (rc_style)->style;
        
        clearlooks_style->menubarstyle      = CLEARLOOKS_RC_STYLE (rc_style)->menubarstyle;
@@ -1460,6 +1478,8 @@ clearlooks_style_draw_layout (GtkStyle * style,
             GtkWidget * widget,
             const gchar * detail, gint x, gint y, PangoLayout * layout)
 {
+       (void) detail;
+
        GdkGC *gc;
 
        g_return_if_fail (GTK_IS_STYLE (style));
@@ -1508,6 +1528,9 @@ clearlooks_style_draw_render_icon (GtkStyle            *style,
              GtkWidget           *widget,
              const char          *detail)
 {
+       (void) direction;
+       (void) detail;
+       
        int width = 1;
        int height = 1;
        GdkPixbuf *scaled;
@@ -1579,6 +1602,7 @@ clearlooks_style_draw_render_icon (GtkStyle            *style,
 static void
 clearlooks_style_init (ClearlooksStyle * style)
 {
+       (void) style;
 }
 
 static void
index a4c92c0de9ddebd925ef7aa6c020524b53910ff7..25c198774c22657c01d22da0814eca9a09817eeb 100644 (file)
@@ -27,7 +27,7 @@ AbstractUI<RequestObject>::register_thread (pthread_t thread_id, string name)
 }
 
 template <typename RequestObject> void
-AbstractUI<RequestObject>::register_thread_with_request_count (pthread_t thread_id, string thread_name, uint32_t num_requests)
+AbstractUI<RequestObject>::register_thread_with_request_count (pthread_t thread_id, string /*thread_name*/, uint32_t num_requests)
 {
        RequestBuffer* b = new RequestBuffer (num_requests);
 
index 89a6ce7789d8963111093254225165e8d5413007..1a70ee71962e9eff6a7a2b5dd5542edff7f77028 100644 (file)
@@ -171,7 +171,7 @@ MidiByteArray MackieMidiBuilder::two_char_display( const std::string & msg, cons
        return bytes;
 }
 
-MidiByteArray MackieMidiBuilder::two_char_display( unsigned int value, const std::string & dots )
+MidiByteArray MackieMidiBuilder::two_char_display (unsigned int value, const std::string & /*dots*/)
 {
        ostringstream os;
        os << setfill('0') << setw(2) << value % 100;
@@ -227,7 +227,7 @@ MidiByteArray MackieMidiBuilder::strip_display( SurfacePort & port, const Strip
        return retval;
 }
        
-MidiByteArray MackieMidiBuilder::all_strips_display( SurfacePort & port, std::vector<std::string> & lines1, std::vector<std::string> & lines2 )
+MidiByteArray MackieMidiBuilder::all_strips_display (SurfacePort & /*port*/, std::vector<std::string> & /*lines1*/, std::vector<std::string> & /*lines2*/)
 {
        MidiByteArray retval;
        retval << 0x12 << 0;