From cbd20ac033144d885e0e2b664d8c03b027542108 Mon Sep 17 00:00:00 2001 From: Philip Rinn Date: Tue, 12 Feb 2013 18:23:51 +0100 Subject: [PATCH] Fix some warnings given by clang, see issue 1718 --- rtengine/dfmanager.cc | 4 ++-- rtengine/ffmanager.cc | 4 ++-- rtgui/batchqueue.cc | 3 ++- rtgui/darkframe.h | 2 +- rtgui/filecatalog.cc | 1 + rtgui/flatfield.h | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/rtengine/dfmanager.cc b/rtengine/dfmanager.cc index 683e09fd4..1a13812cc 100644 --- a/rtengine/dfmanager.cc +++ b/rtengine/dfmanager.cc @@ -251,9 +251,9 @@ dfInfo *DFManager::addFileInfo(const Glib::ustring &filename ,bool pool ) { Glib::RefPtr file = Gio::File::create_for_path(filename); if (!file ) - return false; + return 0; if( !file->query_exists()) - return false; + return 0; Glib::RefPtr info = safe_query_file_info(file); if (info && info->get_file_type() != Gio::FILE_TYPE_DIRECTORY && (!info->is_hidden() || !options.fbShowHidden)) { size_t lastdot = info->get_name().find_last_of ('.'); diff --git a/rtengine/ffmanager.cc b/rtengine/ffmanager.cc index 6e5c1c70f..f888c5983 100644 --- a/rtengine/ffmanager.cc +++ b/rtengine/ffmanager.cc @@ -209,9 +209,9 @@ ffInfo *FFManager::addFileInfo(const Glib::ustring &filename, bool pool ) { Glib::RefPtr file = Gio::File::create_for_path(filename); if (!file ) - return false; + return 0; if( !file->query_exists()) - return false; + return 0; Glib::RefPtr info = safe_query_file_info(file); if (info && info->get_file_type() != Gio::FILE_TYPE_DIRECTORY && (!info->is_hidden() || !options.fbShowHidden)) { size_t lastdot = info->get_name().find_last_of ('.'); diff --git a/rtgui/batchqueue.cc b/rtgui/batchqueue.cc index 5e3be8a2b..2a28c10be 100644 --- a/rtgui/batchqueue.cc +++ b/rtgui/batchqueue.cc @@ -558,6 +558,7 @@ Glib::ustring BatchQueue::autoCompleteFileName (const Glib::ustring& fileName, c // separate filename and the path to the destination directory Glib::ustring dstdir = Glib::path_get_dirname (fileName); Glib::ustring dstfname = Glib::path_get_basename (fileName); + Glib::ustring fname; // create directory, if does not exist if (safe_g_mkdir_with_parents (dstdir, 0755) ) @@ -568,7 +569,6 @@ Glib::ustring BatchQueue::autoCompleteFileName (const Glib::ustring& fileName, c bool inOverwriteMode=options.overwriteOutputFile; for (int tries=0; tries<100; tries++) { - Glib::ustring fname; if (tries==0) fname = Glib::ustring::compose ("%1.%2", Glib::build_filename (dstdir, dstfname), format); else @@ -587,6 +587,7 @@ Glib::ustring BatchQueue::autoCompleteFileName (const Glib::ustring& fileName, c return fname; } } + return ""; } int setProgressUI (void* p) { diff --git a/rtgui/darkframe.h b/rtgui/darkframe.h index 91e405a26..ef0c17206 100644 --- a/rtgui/darkframe.h +++ b/rtgui/darkframe.h @@ -27,7 +27,7 @@ class DFProvider { public: - virtual rtengine::RawImage* getDF() {} + virtual rtengine::RawImage* getDF() = 0; // add other info here }; diff --git a/rtgui/filecatalog.cc b/rtgui/filecatalog.cc index 1231a274e..631dc331d 100644 --- a/rtgui/filecatalog.cc +++ b/rtgui/filecatalog.cc @@ -1533,6 +1533,7 @@ bool FileCatalog::Query_key_pressed (GdkEventKey *event){ // Clear Query if the Escape character is pressed within it FileCatalog::buttonQueryClearPressed (); return true; + default: return false; } } diff --git a/rtgui/flatfield.h b/rtgui/flatfield.h index de2f87823..724870ee0 100644 --- a/rtgui/flatfield.h +++ b/rtgui/flatfield.h @@ -28,7 +28,7 @@ class FFProvider { public: - virtual rtengine::RawImage* getFF() {} + virtual rtengine::RawImage* getFF() = 0; // add other info here };