Fix some warnings given by clang, see issue 1718
This commit is contained in:
@@ -251,9 +251,9 @@ dfInfo *DFManager::addFileInfo(const Glib::ustring &filename ,bool pool )
|
|||||||
{
|
{
|
||||||
Glib::RefPtr<Gio::File> file = Gio::File::create_for_path(filename);
|
Glib::RefPtr<Gio::File> file = Gio::File::create_for_path(filename);
|
||||||
if (!file )
|
if (!file )
|
||||||
return false;
|
return 0;
|
||||||
if( !file->query_exists())
|
if( !file->query_exists())
|
||||||
return false;
|
return 0;
|
||||||
Glib::RefPtr<Gio::FileInfo> info = safe_query_file_info(file);
|
Glib::RefPtr<Gio::FileInfo> info = safe_query_file_info(file);
|
||||||
if (info && info->get_file_type() != Gio::FILE_TYPE_DIRECTORY && (!info->is_hidden() || !options.fbShowHidden)) {
|
if (info && info->get_file_type() != Gio::FILE_TYPE_DIRECTORY && (!info->is_hidden() || !options.fbShowHidden)) {
|
||||||
size_t lastdot = info->get_name().find_last_of ('.');
|
size_t lastdot = info->get_name().find_last_of ('.');
|
||||||
|
@@ -209,9 +209,9 @@ ffInfo *FFManager::addFileInfo(const Glib::ustring &filename, bool pool )
|
|||||||
{
|
{
|
||||||
Glib::RefPtr<Gio::File> file = Gio::File::create_for_path(filename);
|
Glib::RefPtr<Gio::File> file = Gio::File::create_for_path(filename);
|
||||||
if (!file )
|
if (!file )
|
||||||
return false;
|
return 0;
|
||||||
if( !file->query_exists())
|
if( !file->query_exists())
|
||||||
return false;
|
return 0;
|
||||||
Glib::RefPtr<Gio::FileInfo> info = safe_query_file_info(file);
|
Glib::RefPtr<Gio::FileInfo> info = safe_query_file_info(file);
|
||||||
if (info && info->get_file_type() != Gio::FILE_TYPE_DIRECTORY && (!info->is_hidden() || !options.fbShowHidden)) {
|
if (info && info->get_file_type() != Gio::FILE_TYPE_DIRECTORY && (!info->is_hidden() || !options.fbShowHidden)) {
|
||||||
size_t lastdot = info->get_name().find_last_of ('.');
|
size_t lastdot = info->get_name().find_last_of ('.');
|
||||||
|
@@ -558,6 +558,7 @@ Glib::ustring BatchQueue::autoCompleteFileName (const Glib::ustring& fileName, c
|
|||||||
// separate filename and the path to the destination directory
|
// separate filename and the path to the destination directory
|
||||||
Glib::ustring dstdir = Glib::path_get_dirname (fileName);
|
Glib::ustring dstdir = Glib::path_get_dirname (fileName);
|
||||||
Glib::ustring dstfname = Glib::path_get_basename (fileName);
|
Glib::ustring dstfname = Glib::path_get_basename (fileName);
|
||||||
|
Glib::ustring fname;
|
||||||
|
|
||||||
// create directory, if does not exist
|
// create directory, if does not exist
|
||||||
if (safe_g_mkdir_with_parents (dstdir, 0755) )
|
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;
|
bool inOverwriteMode=options.overwriteOutputFile;
|
||||||
|
|
||||||
for (int tries=0; tries<100; tries++) {
|
for (int tries=0; tries<100; tries++) {
|
||||||
Glib::ustring fname;
|
|
||||||
if (tries==0)
|
if (tries==0)
|
||||||
fname = Glib::ustring::compose ("%1.%2", Glib::build_filename (dstdir, dstfname), format);
|
fname = Glib::ustring::compose ("%1.%2", Glib::build_filename (dstdir, dstfname), format);
|
||||||
else
|
else
|
||||||
@@ -587,6 +587,7 @@ Glib::ustring BatchQueue::autoCompleteFileName (const Glib::ustring& fileName, c
|
|||||||
return fname;
|
return fname;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
int setProgressUI (void* p) {
|
int setProgressUI (void* p) {
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
class DFProvider {
|
class DFProvider {
|
||||||
public:
|
public:
|
||||||
virtual rtengine::RawImage* getDF() {}
|
virtual rtengine::RawImage* getDF() = 0;
|
||||||
// add other info here
|
// add other info here
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -1533,6 +1533,7 @@ bool FileCatalog::Query_key_pressed (GdkEventKey *event){
|
|||||||
// Clear Query if the Escape character is pressed within it
|
// Clear Query if the Escape character is pressed within it
|
||||||
FileCatalog::buttonQueryClearPressed ();
|
FileCatalog::buttonQueryClearPressed ();
|
||||||
return true;
|
return true;
|
||||||
|
default: return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
class FFProvider {
|
class FFProvider {
|
||||||
public:
|
public:
|
||||||
virtual rtengine::RawImage* getFF() {}
|
virtual rtengine::RawImage* getFF() = 0;
|
||||||
// add other info here
|
// add other info here
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user