[Pkg-owncloud-commits] [owncloud-client] 12/115: Silent some warnings
Sandro Knauß
hefee-guest at moszumanska.debian.org
Fri Aug 29 22:03:54 UTC 2014
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 4ff0e7e0a23ed34bd3603cd03ac59c945cc1a21d
Author: Olivier Goffart <ogoffart at woboq.com>
Date: Tue Aug 12 14:03:04 2014 +0200
Silent some warnings
---
csync/src/csync_exclude.c | 5 ++++-
csync/src/csync_util.c | 4 +++-
src/mirall/folder.cpp | 2 +-
src/mirall/utility.cpp | 1 +
4 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/csync/src/csync_exclude.c b/csync/src/csync_exclude.c
index 25cd060..299ae8b 100644
--- a/csync/src/csync_exclude.c
+++ b/csync/src/csync_exclude.c
@@ -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;
diff --git a/csync/src/csync_util.c b/csync/src/csync_util.c
index ff18c3e..c73538a 100644
--- a/csync/src/csync_util.c
+++ b/csync/src/csync_util.c
@@ -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);
diff --git a/src/mirall/folder.cpp b/src/mirall/folder.cpp
index 7e78fde..0b59485 100644
--- a/src/mirall/folder.cpp
+++ b/src/mirall/folder.cpp
@@ -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"
diff --git a/src/mirall/utility.cpp b/src/mirall/utility.cpp
index 9b47c89..09f9c75 100644
--- a/src/mirall/utility.cpp
+++ b/src/mirall/utility.cpp
@@ -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
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list