From: joncruz Date: Sun, 20 Jul 2008 07:26:15 +0000 (+0000) Subject: Warning cleanup X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=68e3bfbbc1aac7dac3e9c06487047f0377b2b3cd;p=inkscape.git Warning cleanup --- diff --git a/src/extension/internal/bitmap/imagemagick.cpp b/src/extension/internal/bitmap/imagemagick.cpp index 9b6ed5390..0be324f42 100644 --- a/src/extension/internal/bitmap/imagemagick.cpp +++ b/src/extension/internal/bitmap/imagemagick.cpp @@ -125,13 +125,13 @@ ImageMagickDocCache::readImage(const char *xlink, Magick::Image *image) } bool -ImageMagick::load(Inkscape::Extension::Extension *module) +ImageMagick::load(Inkscape::Extension::Extension */*module*/) { return true; } Inkscape::Extension::Implementation::ImplementationDocumentCache * -ImageMagick::newDocCache (Inkscape::Extension::Extension * ext, Inkscape::UI::View::View * view) { +ImageMagick::newDocCache (Inkscape::Extension::Extension * /*ext*/, Inkscape::UI::View::View * view) { return new ImageMagickDocCache(view); } @@ -211,7 +211,7 @@ ImageMagick::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::Vi Uses AutoGUI for creating the GUI. */ Gtk::Widget * -ImageMagick::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View * view, sigc::signal * changeSignal, Inkscape::Extension::Implementation::ImplementationDocumentCache * docCache) +ImageMagick::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View * view, sigc::signal * changeSignal, Inkscape::Extension::Implementation::ImplementationDocumentCache * /*docCache*/) { SPDocument * current_document = view->doc(); diff --git a/src/extension/internal/bitmap/imagemagick.h b/src/extension/internal/bitmap/imagemagick.h index 4a8a318fc..5b4a1eb21 100644 --- a/src/extension/internal/bitmap/imagemagick.h +++ b/src/extension/internal/bitmap/imagemagick.h @@ -20,15 +20,15 @@ namespace Bitmap { class ImageMagick : public Inkscape::Extension::Implementation::Implementation { public: - /* Functions to be implemented by subclasses */ - virtual void applyEffect(Magick::Image *image) { }; - virtual void refreshParameters(Inkscape::Extension::Effect *module) { }; + /* Functions to be implemented by subclasses */ + virtual void applyEffect(Magick::Image */*image*/) { }; + virtual void refreshParameters(Inkscape::Extension::Effect */*module*/) { }; - /* Functions implemented from ::Implementation */ - bool load(Inkscape::Extension::Extension *module); - Inkscape::Extension::Implementation::ImplementationDocumentCache * newDocCache (Inkscape::Extension::Extension * ext, Inkscape::UI::View::View * doc); - void effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View *document, Inkscape::Extension::Implementation::ImplementationDocumentCache * docCache); - Gtk::Widget* prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View * view, sigc::signal * changeSignal, Inkscape::Extension::Implementation::ImplementationDocumentCache * docCache); + /* Functions implemented from ::Implementation */ + bool load(Inkscape::Extension::Extension *module); + Inkscape::Extension::Implementation::ImplementationDocumentCache * newDocCache (Inkscape::Extension::Extension * ext, Inkscape::UI::View::View * doc); + void effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View *document, Inkscape::Extension::Implementation::ImplementationDocumentCache * docCache); + Gtk::Widget* prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View * view, sigc::signal * changeSignal, Inkscape::Extension::Implementation::ImplementationDocumentCache * docCache); }; }; /* namespace Bitmap */ diff --git a/src/libnrtype/Layout-TNG-OutIter.cpp b/src/libnrtype/Layout-TNG-OutIter.cpp index 7a45425c0..2471da3dd 100644 --- a/src/libnrtype/Layout-TNG-OutIter.cpp +++ b/src/libnrtype/Layout-TNG-OutIter.cpp @@ -703,7 +703,7 @@ bool Layout::iterator::nextLineCursor(int n) if (line_index == _parent_layout->_lines.size() - 1) return false; // nowhere to go else - n = MIN (n, _parent_layout->_lines.size() - 1 - line_index); + n = MIN (n, static_cast(_parent_layout->_lines.size() - 1 - line_index)); if (_parent_layout->_lines[line_index + n].in_shape != _parent_layout->_lines[line_index].in_shape) { // switching between shapes: adjust the stored x to compensate _x_coordinate += _parent_layout->_chunks[_parent_layout->_spans[_parent_layout->_lineToSpan(line_index + n)].in_chunk].left_x @@ -726,7 +726,7 @@ bool Layout::iterator::prevLineCursor(int n) if (line_index == 0) return false; // nowhere to go else - n = MIN (n, line_index); + n = MIN (n, static_cast(line_index)); if (_parent_layout->_lines[line_index - n].in_shape != _parent_layout->_lines[line_index].in_shape) { // switching between shapes: adjust the stored x to compensate _x_coordinate += _parent_layout->_chunks[_parent_layout->_spans[_parent_layout->_lineToSpan(line_index - n)].in_chunk].left_x diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp index 836eb8fd4..d577a6cc4 100644 --- a/src/ui/dialog/filter-effects-dialog.cpp +++ b/src/ui/dialog/filter-effects-dialog.cpp @@ -209,17 +209,19 @@ template< typename T> class ComboWithTooltip : public Gtk::EventBox public: ComboWithTooltip(T default_value, const Util::EnumDataConverter& c, const SPAttributeEnum a = SP_ATTR_INVALID, char* tip_text = NULL) { - if (tip_text) _tt.set_tip(*this, tip_text); + if (tip_text) { + _tt.set_tip(*this, tip_text); + } combo = new ComboBoxEnum(default_value, c, a); add(*combo); show_all(); } - + ~ComboWithTooltip() { delete combo; } - + ComboBoxEnum* get_attrwidget() { return combo; @@ -315,7 +317,7 @@ public: } _s1.set_value(n.getNumber()); _s2.set_value(n.getOptNumber()); - + } private: Gtk::SpinButton _s1, _s2; @@ -869,7 +871,7 @@ public: std::vector default_values; default_values.push_back(def1); default_values.push_back(def2); - + std::vector tips; tips.push_back(tip1); tips.push_back(tip2); @@ -1901,10 +1903,11 @@ bool FilterEffectsDialog::PrimitiveList::on_button_release_event(GdkEventButton* const int sources_x = rct.get_width() - twidth * FPInputConverter._length; if(cx > sources_x) { int src = (cx - sources_x) / twidth; - if(src < 0) + if (src < 0) { src = 0; - else if(src >= FPInputConverter._length) + } else if(src >= static_cast(FPInputConverter._length)) { src = FPInputConverter._length - 1; + } result = FPInputConverter.get_key((FilterPrimitiveInput)src); in_val = result.c_str(); } @@ -2178,7 +2181,7 @@ void FilterEffectsDialog::init_settings_widgets() _empty_settings.set_sensitive(false); _settings_tab1.pack_start(_empty_settings); - + _no_filter_selected.set_sensitive(false); _settings_tab2.pack_start(_no_filter_selected); _settings_initialized = true; @@ -2482,7 +2485,7 @@ void FilterEffectsDialog::update_settings_view() _infobox_icon.hide(); _infobox_desc.hide(); } - + SPFilterPrimitive* prim = _primitive_list.get_selected(); if(prim) { diff --git a/src/ui/widget/combo-enums.h b/src/ui/widget/combo-enums.h index 11640f3ca..c418ea28b 100644 --- a/src/ui/widget/combo-enums.h +++ b/src/ui/widget/combo-enums.h @@ -37,7 +37,7 @@ public: pack_start(_columns.label); // Initialize list - for(int i = 0; i < _converter._length; ++i) { + for(int i = 0; i < static_cast(_converter._length); ++i) { Gtk::TreeModel::Row row = *_model->append(); const Util::EnumData* data = &_converter.data(i); row[_columns.data] = data; diff --git a/src/ui/widget/icon-widget.cpp b/src/ui/widget/icon-widget.cpp index 7e812236f..64415f421 100644 --- a/src/ui/widget/icon-widget.cpp +++ b/src/ui/widget/icon-widget.cpp @@ -28,14 +28,14 @@ namespace Widget { * * An icon widget is a ... */ - -IconWidget::IconWidget() + +IconWidget::IconWidget() { _pb = NULL; _size = 0; } -IconWidget::IconWidget(int unsigned size, int unsigned scale, gchar const *name) +IconWidget::IconWidget(int unsigned size, int unsigned scale, gchar const *name) { _size = std::max((int unsigned)128, std::min(size, (int unsigned)1)); @@ -48,19 +48,19 @@ IconWidget::IconWidget(int unsigned size, int unsigned scale, gchar const *name) _pb = NULL; } else { /* TODO - _pb = gdk_pixbuf_new_from_data(pixels, GDK_COLORSPACE_RGB, - TRUE, 8, _size, _size, _size * 4, + _pb = gdk_pixbuf_new_from_data(pixels, GDK_COLORSPACE_RGB, + TRUE, 8, _size, _size, _size * 4, (GdkPixbufDestroyNotify)g_free, NULL); */ } } -IconWidget::IconWidget(int unsigned size, guchar const *px) +IconWidget::IconWidget(int unsigned size, guchar const */*px*/) { _size = std::max((int unsigned)128, std::min(size, (int unsigned)1)); /* - _pb = gdk_pixbuf_new_from_data((guchar *)px, GDK_COLORSPACE_RGB, + _pb = gdk_pixbuf_new_from_data((guchar *)px, GDK_COLORSPACE_RGB, TRUE, 8, _size, _size, _size * 4, NULL, NULL); */ } @@ -132,19 +132,19 @@ guchar* IconWidget::image_load(gchar const *name, int unsigned size, int unsigne return px; } -guchar* IconWidget::image_load_pixmap(gchar const *name, int unsigned size, int unsigned scale) +guchar* IconWidget::image_load_pixmap(gchar const */*name*/, int unsigned /*size*/, int unsigned /*scale*/) { // TODO return NULL; } -guchar* IconWidget::image_load_svg(gchar const *name, int unsigned size, int unsigned scale) +guchar* IconWidget::image_load_svg(gchar const */*name*/, int unsigned /*size*/, int unsigned /*scale*/) { // TODO return NULL; } -guchar* IconWidget::image_load_gtk(gchar const *name, int unsigned size, int unsigned scale) +guchar* IconWidget::image_load_gtk(gchar const */*name*/, int unsigned /*size*/, int unsigned /*scale*/) { // TODO return NULL; @@ -154,7 +154,7 @@ guchar* IconWidget::image_load_gtk(gchar const *name, int unsigned size, int uns } // namespace UI } // namespace Inkscape -/* +/* Local Variables: mode:c++ c-file-style:"stroustrup" diff --git a/src/xml/composite-node-observer.cpp b/src/xml/composite-node-observer.cpp index e390a3f87..e65981616 100644 --- a/src/xml/composite-node-observer.cpp +++ b/src/xml/composite-node-observer.cpp @@ -172,7 +172,7 @@ struct unmarked_record_satisfying { }; template -bool mark_one(ObserverRecordList &observers, unsigned &marked_count, +bool mark_one(ObserverRecordList &observers, unsigned &/*marked_count*/, Predicate p) { ObserverRecordList::iterator found=std::find_if( @@ -189,7 +189,7 @@ bool mark_one(ObserverRecordList &observers, unsigned &marked_count, } template -bool remove_one(ObserverRecordList &observers, unsigned &marked_count, +bool remove_one(ObserverRecordList &observers, unsigned &/*marked_count*/, Predicate p) { if (observers.empty()) { diff --git a/src/xml/event.cpp b/src/xml/event.cpp index d713200e5..ded96e722 100644 --- a/src/xml/event.cpp +++ b/src/xml/event.cpp @@ -95,25 +95,25 @@ public: parent.addChild(&child, ref); } - void notifyChildRemoved(Node &parent, Node &child, Node *old_ref) { + void notifyChildRemoved(Node &parent, Node &child, Node */*old_ref*/) { parent.removeChild(&child); } void notifyChildOrderChanged(Node &parent, Node &child, - Node *old_ref, Node *new_ref) + Node */*old_ref*/, Node *new_ref) { parent.changeOrder(&child, new_ref); } void notifyAttributeChanged(Node &node, GQuark name, - Inkscape::Util::ptr_shared old_value, + Inkscape::Util::ptr_shared /*old_value*/, Inkscape::Util::ptr_shared new_value) { node.setAttribute(g_quark_to_string(name), new_value); } void notifyContentChanged(Node &node, - Inkscape::Util::ptr_shared old_value, + Inkscape::Util::ptr_shared /*old_value*/, Inkscape::Util::ptr_shared new_value) { node.setContent(new_value); @@ -435,18 +435,18 @@ public: g_warning("Event: Added %s to %s after %s", node_to_string(parent).c_str(), node_to_string(child).c_str(), ref_to_string(ref).c_str()); } - void notifyChildRemoved(Node &parent, Node &child, Node *ref) { + void notifyChildRemoved(Node &parent, Node &child, Node */*ref*/) { g_warning("Event: Removed %s from %s", node_to_string(parent).c_str(), node_to_string(child).c_str()); } void notifyChildOrderChanged(Node &parent, Node &child, - Node *old_ref, Node *new_ref) + Node */*old_ref*/, Node *new_ref) { g_warning("Event: Moved %s after %s in %s", node_to_string(child).c_str(), ref_to_string(new_ref).c_str(), node_to_string(parent).c_str()); } void notifyAttributeChanged(Node &node, GQuark name, - Inkscape::Util::ptr_shared old_value, + Inkscape::Util::ptr_shared /*old_value*/, Inkscape::Util::ptr_shared new_value) { if (new_value) { @@ -457,7 +457,7 @@ public: } void notifyContentChanged(Node &node, - Inkscape::Util::ptr_shared old_value, + Inkscape::Util::ptr_shared /*old_value*/, Inkscape::Util::ptr_shared new_value) { if (new_value) {