From 6fe04e3990c88302475bc3afabbec4f4e000954d Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Sat, 1 Apr 2017 15:55:39 +0200 Subject: [PATCH] fixed warnings in rtgui --- rtgui/batchqueueentry.cc | 2 +- rtgui/browserfilter.cc | 5 +++-- rtgui/clipboard.cc | 2 +- rtgui/colorappearance.cc | 2 +- rtgui/colortoning.h | 6 +----- rtgui/crophandler.cc | 2 +- rtgui/crophandler.h | 1 - rtgui/cropwindow.cc | 2 +- rtgui/cropwindow.h | 2 +- rtgui/defringe.cc | 2 +- rtgui/diagonalcurveeditorsubgroup.cc | 1 - rtgui/dirpyrdenoise.cc | 2 +- rtgui/dynamicprofilepanel.cc | 1 - rtgui/exifpanel.h | 2 -- rtgui/filebrowserentry.cc | 1 + rtgui/guiutils.cc | 4 ++-- rtgui/icmpanel.h | 3 --- rtgui/labcurve.cc | 2 +- rtgui/lwbuttonset.cc | 2 +- rtgui/popupcommon.cc | 4 ++-- rtgui/retinex.cc | 2 +- rtgui/shcselector.cc | 2 +- rtgui/thumbnail.cc | 2 +- rtgui/thumbnail.h | 1 - rtgui/wavelet.cc | 2 +- 25 files changed, 23 insertions(+), 34 deletions(-) diff --git a/rtgui/batchqueueentry.cc b/rtgui/batchqueueentry.cc index 09397f2a3..8386a8ee6 100644 --- a/rtgui/batchqueueentry.cc +++ b/rtgui/batchqueueentry.cc @@ -32,7 +32,7 @@ Glib::RefPtr BatchQueueEntry::savedAsIcon; BatchQueueEntry::BatchQueueEntry (rtengine::ProcessingJob* pjob, const rtengine::procparams::ProcParams& pparams, Glib::ustring fname, int prevw, int prevh, Thumbnail* thm) : ThumbBrowserEntryBase(fname), opreview(nullptr), origpw(prevw), origph(prevh), opreviewDone(false), - job(pjob), progress(0), outFileName(""), sequence(0), forceFormatOpts(false), params(pparams) + job(pjob), params(pparams), progress(0), outFileName(""), sequence(0), forceFormatOpts(false) { thumbnail = thm; diff --git a/rtgui/browserfilter.cc b/rtgui/browserfilter.cc index 3d43400ba..ab4c843a4 100644 --- a/rtgui/browserfilter.cc +++ b/rtgui/browserfilter.cc @@ -18,11 +18,12 @@ */ #include "browserfilter.h" -BrowserFilter::BrowserFilter () : exifFilterEnabled (false), +BrowserFilter::BrowserFilter () : showTrash (true), showNotTrash (true), showOriginal (false), - multiselect (false) + multiselect (false), + exifFilterEnabled (false) { for (int i = 0; i < 6; i++) { showRanked[i] = true; diff --git a/rtgui/clipboard.cc b/rtgui/clipboard.cc index a1b94a615..dfd78cdd1 100644 --- a/rtgui/clipboard.cc +++ b/rtgui/clipboard.cc @@ -20,7 +20,7 @@ Clipboard clipboard; -Clipboard::Clipboard () : partProfile (false), _hasIPTC(false), hasDiagonalCurveDataType(DCT_Empty), hasFlatCurveDataType(FCT_Empty) {} +Clipboard::Clipboard () : _hasIPTC(false), partProfile (false), hasDiagonalCurveDataType(DCT_Empty), hasFlatCurveDataType(FCT_Empty) {} Clipboard::~Clipboard () { diff --git a/rtgui/colorappearance.cc b/rtgui/colorappearance.cc index a198dd1f5..cdcfb10f2 100644 --- a/rtgui/colorappearance.cc +++ b/rtgui/colorappearance.cc @@ -1055,7 +1055,7 @@ bool ColorAppearance::adapCamComputed_ () void ColorAppearance::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller) { - float R, G, B; + float R = 0.f, G = 0.f, B = 0.f; if (elemType == ColorCaller::CCET_VERTICAL_BAR) { valY = 0.5; diff --git a/rtgui/colortoning.h b/rtgui/colortoning.h index 7f1290bf6..347cfd126 100644 --- a/rtgui/colortoning.h +++ b/rtgui/colortoning.h @@ -50,7 +50,7 @@ public: void colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller* caller); private: - Gtk::HSeparator* satLimiterSep; + //Gtk::HSeparator* satLimiterSep; Gtk::HSeparator* colorSep; CurveEditorGroup* colorCurveEditorG; CurveEditorGroup* opacityCurveEditorG; @@ -83,20 +83,16 @@ private: Adjuster* satProtectionThreshold; Adjuster* saturatedOpacity; Adjuster* strength; - Gtk::Image* itot; Gtk::Image* iby; Gtk::Image* irg; Gtk::Button* neutral; Gtk::HBox* neutrHBox; - Gtk::HBox* chromaHbox; - Gtk::Label* chroLabel; int nextbw; int nextsatth; int nextsatpr; Glib::ustring nextbalcolor; Glib::ustring balcolor; - bool lasttwocolor; sigc::connection neutralconn, twocconn; //, neutralcurvesconn; bool lastautosat; sigc::connection autosatConn; diff --git a/rtgui/crophandler.cc b/rtgui/crophandler.cc index 8ff95b01b..6d6e9c42f 100644 --- a/rtgui/crophandler.cc +++ b/rtgui/crophandler.cc @@ -30,7 +30,7 @@ using namespace rtengine; CropHandler::CropHandler () - : zoom(100), ww(0), wh(0), imx(-1), imy(-1), imw(0), imh(0), cax(-1), cay(-1), + : zoom(100), ww(0), wh(0), cax(-1), cay(-1), cx(0), cy(0), cw(0), ch(0), cropX(0), cropY(0), cropW(0), cropH(0), enabled(false), cropimg(nullptr), cropimgtrue(nullptr), cropimg_width(0), cropimg_height(0), cix(0), ciy(0), ciw(0), cih(0), cis(1), diff --git a/rtgui/crophandler.h b/rtgui/crophandler.h index 0492aea2a..1e7a9202b 100644 --- a/rtgui/crophandler.h +++ b/rtgui/crophandler.h @@ -108,7 +108,6 @@ private: int zoom; // scale factor (e.g. 5 if 1:5 scale) ; if 1:1 scale and bigger, factor is multiplied by 1000 (i.e. 1000 for 1:1 scale, 2000 for 2:1, etc...) int ww, wh; // size of the crop's canvas on the screen ; might be bigger than the displayed image, but not smaller - int imx, imy, imw, imh; // this is a copy of the cropwindow's parameters int cax, cay; // clamped crop anchor's coordinate, i.e. point of the image that coincide to the center of the display area, expressed in image coordinates; cannot be outside the image's bounds; but if cax==cay==-1, designate the center of the image int cx, cy, cw, ch; // position and size of the requested crop ; position expressed in image coordinates, so cx and cy might be negative and cw and ch higher than the image's 1:1 size int cropX, cropY, cropW, cropH; // cropPixbuf's displayed area (position and size), i.e. coordinates in 1:1 scale, i.e. cx, cy, cw & ch trimmed to the image's bounds diff --git a/rtgui/cropwindow.cc b/rtgui/cropwindow.cc index 6d0391232..bd66dac17 100644 --- a/rtgui/cropwindow.cc +++ b/rtgui/cropwindow.cc @@ -36,7 +36,7 @@ using namespace rtengine; CropWindow::CropWindow (ImageArea* parent, bool isLowUpdatePriority_, bool isDetailWindow) : ObjectMOBuffer(parent), state(SNormal), press_x(0), press_y(0), action_x(0), action_y(0), pickedObject(-1), pickModifierKey(0), rot_deg(0), onResizeArea(false), deleted(false), - fitZoomEnabled(true), fitZoom(false), isLowUpdatePriority(isLowUpdatePriority_), hoveredPicker(nullptr), cropLabel(Glib::ustring("100%")), + fitZoomEnabled(true), fitZoom(false), /*isLowUpdatePriority(isLowUpdatePriority_),*/ hoveredPicker(nullptr), cropLabel(Glib::ustring("100%")), backColor(options.bgcolor), decorated(true), isFlawnOver(false), titleHeight(30), sideBorderWidth(3), lowerBorderWidth(3), upperBorderWidth(1), sepWidth(2), xpos(30), ypos(30), width(0), height(0), imgAreaX(0), imgAreaY(0), imgAreaW(0), imgAreaH(0), imgX(-1), imgY(-1), imgW(1), imgH(1), iarea(parent), cropZoom(0), zoomVersion(0), exposeVersion(0), cropgl(nullptr), diff --git a/rtgui/cropwindow.h b/rtgui/cropwindow.h index 66b6405c5..3f80a75c4 100644 --- a/rtgui/cropwindow.h +++ b/rtgui/cropwindow.h @@ -58,7 +58,7 @@ class CropWindow : public LWButtonListener, public CropDisplayHandler, public Ed bool deleted; bool fitZoomEnabled; bool fitZoom; - bool isLowUpdatePriority; + //bool isLowUpdatePriority; CursorShape cursor_type; // color pickers diff --git a/rtgui/defringe.cc b/rtgui/defringe.cc index 0ba3dec9f..5f70925e7 100644 --- a/rtgui/defringe.cc +++ b/rtgui/defringe.cc @@ -68,7 +68,7 @@ Defringe::~Defringe () void Defringe::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller) { - float R, G, B; + float R = 0.f, G = 0.f, B = 0.f; if (elemType == ColorCaller::CCET_VERTICAL_BAR) { valY = 0.5; diff --git a/rtgui/diagonalcurveeditorsubgroup.cc b/rtgui/diagonalcurveeditorsubgroup.cc index 8f81333d7..d12cdf023 100644 --- a/rtgui/diagonalcurveeditorsubgroup.cc +++ b/rtgui/diagonalcurveeditorsubgroup.cc @@ -40,7 +40,6 @@ DiagonalCurveEditorSubGroup::DiagonalCurveEditorSubGroup (CurveEditorGroup* prt, Gtk::PositionType sideStart = options.curvebboxpos == 0 || options.curvebboxpos == 2 ? Gtk::POS_LEFT : Gtk::POS_TOP; Gtk::PositionType sideEnd = options.curvebboxpos == 0 || options.curvebboxpos == 2 ? Gtk::POS_RIGHT : Gtk::POS_BOTTOM; - bool vExpand = options.curvebboxpos == 0 || options.curvebboxpos == 2; valLinear = (int)DCT_Linear; valUnchanged = (int)DCT_Unchanged; diff --git a/rtgui/dirpyrdenoise.cc b/rtgui/dirpyrdenoise.cc index 1fe86c2ca..61b9bf55a 100644 --- a/rtgui/dirpyrdenoise.cc +++ b/rtgui/dirpyrdenoise.cc @@ -1247,7 +1247,7 @@ void DirPyrDenoise::setAdjusterBehavior (bool lumaadd, bool lumdetadd, bool chro void DirPyrDenoise::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller) { - float R, G, B; + float R = 0.f, G = 0.f, B = 0.f; if (elemType == ColorCaller::CCET_VERTICAL_BAR) { valY = 0.5; diff --git a/rtgui/dynamicprofilepanel.cc b/rtgui/dynamicprofilepanel.cc index e5f9ae1cc..172c06f47 100644 --- a/rtgui/dynamicprofilepanel.cc +++ b/rtgui/dynamicprofilepanel.cc @@ -505,7 +505,6 @@ void DynamicProfilePanel::on_button_edit() } EditDialog d(M("DYNPROFILEEDITOR_EDIT_RULE"), static_cast(*get_toplevel())); - auto it = s->get_selected(); Gtk::TreeModel::Row row = *(s->get_selected()); d.set_rule(to_rule(row)); int status = d.run(); diff --git a/rtgui/exifpanel.h b/rtgui/exifpanel.h index fd797ff56..6244c1a4f 100644 --- a/rtgui/exifpanel.h +++ b/rtgui/exifpanel.h @@ -27,8 +27,6 @@ class ExifPanel : public Gtk::VBox, public ToolPanel private: const rtengine::ImageMetaData* idata; - int fullw, fullh, cx, cy, cw, ch; - bool crenabled; rtengine::procparams::ExifPairs changeList; rtengine::procparams::ExifPairs defChangeList; bool recursiveOp; diff --git a/rtgui/filebrowserentry.cc b/rtgui/filebrowserentry.cc index d452b88cd..96861544b 100644 --- a/rtgui/filebrowserentry.cc +++ b/rtgui/filebrowserentry.cc @@ -635,6 +635,7 @@ bool FileBrowserEntry::onArea (CursorArea a, int x, int y) y1 < cropParams.y + cropParams.h - 1 && x1 > cropParams.x && x1 < cropParams.x + cropParams.w - 1; + default: /* do nothing */ ; } return false; diff --git a/rtgui/guiutils.cc b/rtgui/guiutils.cc index 451af4e38..3295ab169 100644 --- a/rtgui/guiutils.cc +++ b/rtgui/guiutils.cc @@ -1620,8 +1620,8 @@ void BackBuffer::copySurface(Cairo::RefPtr crDest, Gdk::Rectangl int offsetY = rtengine::LIM(offset.y, 0, surface->get_height()); // now copy the off-screen Surface to the destination Surface - int srcSurfW = surface->get_width(); - int srcSurfH = surface->get_height(); + // int srcSurfW = surface->get_width(); + // int srcSurfH = surface->get_height(); //printf("srcSurf: w: %d, h: %d\n", srcSurfW, srcSurfH); crDest->set_line_width(0.); diff --git a/rtgui/icmpanel.h b/rtgui/icmpanel.h index 84171ae87..846129105 100644 --- a/rtgui/icmpanel.h +++ b/rtgui/icmpanel.h @@ -88,8 +88,6 @@ private: sigc::connection onamesconn; PopUpButton* ointent; sigc::connection ointentconn; - Gtk::RadioButton* ofromdir; - Gtk::RadioButton* ofromfile; Gtk::RadioButton* iunchanged; MyFileChooserButton* ipDialog; Gtk::RadioButton::Group opts; @@ -99,7 +97,6 @@ private: ICMPanelListener* icmplistener; double dcpTemperatures[2]; - bool enableLastICCWorkDirChange; Glib::ustring lastRefFilename; Glib::ustring camName; void updateDCP(int dcpIlluminant, Glib::ustring dcp_name); diff --git a/rtgui/labcurve.cc b/rtgui/labcurve.cc index a173b47ec..dc9e404fb 100644 --- a/rtgui/labcurve.cc +++ b/rtgui/labcurve.cc @@ -559,7 +559,7 @@ void LCurve::adjusterChanged (Adjuster* a, double newval) void LCurve::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller) { - float R, G, B; + float R = 0.f, G = 0.f, B = 0.f; if (elemType == ColorCaller::CCET_VERTICAL_BAR) { valY = 0.5; diff --git a/rtgui/lwbuttonset.cc b/rtgui/lwbuttonset.cc index 9fc1bc443..6265c1039 100644 --- a/rtgui/lwbuttonset.cc +++ b/rtgui/lwbuttonset.cc @@ -72,7 +72,7 @@ void LWButtonSet::arrangeButtons (int x, int y, int w, int h) for (size_t i = 0; i < buttons.size(); i++) { LWButton::Alignment halign, valign; - int bx, by, bw, bh; + int bx = 0, by = 0, bw = 0, bh = 0; buttons[i]->getSize (bw, bh); buttons[i]->getAlignment (halign, valign); diff --git a/rtgui/popupcommon.cc b/rtgui/popupcommon.cc index 09feb1c3a..7dfdc0019 100644 --- a/rtgui/popupcommon.cc +++ b/rtgui/popupcommon.cc @@ -26,9 +26,9 @@ #include "guiutils.h" PopUpCommon::PopUpCommon (Gtk::Button* thisButton, const Glib::ustring& label) - : selected (-1) // -1 means that the button is invalid + : buttonImage (nullptr) , menu (nullptr) - , buttonImage (nullptr) + , selected (-1) // -1 means that the button is invalid { button = thisButton; hasMenu = false; diff --git a/rtgui/retinex.cc b/rtgui/retinex.cc index 4686e325e..26e4ac565 100644 --- a/rtgui/retinex.cc +++ b/rtgui/retinex.cc @@ -1513,7 +1513,7 @@ void Retinex::updateCurveBackgroundHistogram (LUTu & histToneCurve, LUTu & histL void Retinex::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller) { - float R, G, B; + float R = 0.f, G = 0.f, B = 0.f; if (elemType == ColorCaller::CCET_VERTICAL_BAR) { valY = 0.5; diff --git a/rtgui/shcselector.cc b/rtgui/shcselector.cc index cc22814e6..e8e7f46fa 100644 --- a/rtgui/shcselector.cc +++ b/rtgui/shcselector.cc @@ -204,7 +204,7 @@ void SHCSelector::updateBackBuffer() cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); cr->stroke (); } - /* + / * else if (i==litCursor) { // prelight Gdk::RGBA c = style->get_background_color(Gtk::STATE_FLAG_PRELIGHT); diff --git a/rtgui/thumbnail.cc b/rtgui/thumbnail.cc index 0bbefa298..2e8a904c1 100644 --- a/rtgui/thumbnail.cc +++ b/rtgui/thumbnail.cc @@ -64,7 +64,7 @@ Thumbnail::Thumbnail (CacheManager* cm, const Glib::ustring& fname, CacheImageDa Thumbnail::Thumbnail (CacheManager* cm, const Glib::ustring& fname, const std::string& md5) : fname(fname), cachemgr(cm), ref(1), enqueueNumber(0), tpp(nullptr), pparamsValid(false), - pparamsSet(false), needsReProcessing(true), imageLoading(false), lastImg(nullptr), + needsReProcessing(true), imageLoading(false), lastImg(nullptr), lastW(0), lastH(0), lastScale(0.0), initial_(true) { diff --git a/rtgui/thumbnail.h b/rtgui/thumbnail.h index e5b6a72b2..eb9e38f7f 100644 --- a/rtgui/thumbnail.h +++ b/rtgui/thumbnail.h @@ -49,7 +49,6 @@ class Thumbnail rtengine::procparams::ProcParams pparams; bool pparamsValid; - bool pparamsSet; bool needsReProcessing; bool imageLoading; diff --git a/rtgui/wavelet.cc b/rtgui/wavelet.cc index e1d0fc425..ef8c2c5e3 100644 --- a/rtgui/wavelet.cc +++ b/rtgui/wavelet.cc @@ -2863,7 +2863,7 @@ void Wavelet::tmrToggled () void Wavelet::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller) { - float R, G, B; + float R = 0.f, G = 0.f, B = 0.f; if (elemType == ColorCaller::CCET_VERTICAL_BAR) { valY = 0.5;