Silent some warnings

This commit is contained in:
Olivier Goffart 2014-08-12 14:03:04 +02:00
parent ef6c82ba00
commit 4ff0e7e0a2
4 changed files with 9 additions and 3 deletions

View File

@ -208,7 +208,10 @@ CSYNC_EXCLUDE_TYPE csync_excluded(CSYNC *ctx, const char *path, int filetype) {
}
if (getenv("CSYNC_CONFLICT_FILE_USERNAME")) {
asprintf(&conflict, "*_conflict_%s-*", getenv("CSYNC_CONFLICT_FILE_USERNAME"));
rc = asprintf(&conflict, "*_conflict_%s-*", getenv("CSYNC_CONFLICT_FILE_USERNAME"));
if (rc < 0) {
goto out;
}
rc = csync_fnmatch(conflict, path, 0);
if (rc == 0) {
match = CSYNC_FILE_SILENTLY_EXCLUDED;

View File

@ -140,7 +140,9 @@ bool csync_file_locked_or_open( const char *dir, const char *fname) {
if (!csync_file_locked_or_open_ext) {
return false;
}
asprintf(&tmp_uri, "%s/%s", dir, fname);
if (asprintf(&tmp_uri, "%s/%s", dir, fname) < 0) {
return -1;
}
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, "csync_file_locked_or_open %s", tmp_uri);
ret = csync_file_locked_or_open_ext(tmp_uri);
SAFE_FREE(tmp_uri);

View File

@ -711,7 +711,7 @@ void Folder::slotJobCompleted(const SyncFileItem &item)
}
void Folder::slotAboutToRemoveAllFiles(SyncFileItem::Direction direction, bool *cancel)
void Folder::slotAboutToRemoveAllFiles(SyncFileItem::Direction, bool *cancel)
{
QString msg =
tr("This sync would remove all the files in the sync folder '%1'.\n"

View File

@ -367,6 +367,7 @@ void Utility::winShellChangeNotify( const QString& path )
SHChangeNotify(SHCNE_UPDATEITEM, SHCNF_PATH | SHCNF_FLUSHNOWAIT,
reinterpret_cast<const wchar_t *>(QDir::toNativeSeparators(path).utf16()), NULL );
#else
Q_UNUSED(path);
qDebug() << Q_FUNC_INFO << " is not implemented on non Windows systems.";
#endif
}