[Pkg-owncloud-commits] [owncloud-client] 36/70: Remove misleading error message of "unknown error" for custom errnos.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Sat May 17 20:01:28 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 3705a423757f8d334ce8adac5d3215df28b5ed96
Author: Klaas Freitag <freitag at owncloud.com>
Date: Tue May 13 10:39:06 2014 +0200
Remove misleading error message of "unknown error" for custom errnos.
---
csync/src/csync_update.c | 6 +-----
csync/src/std/c_macro.h | 3 ---
2 files changed, 1 insertion(+), 8 deletions(-)
diff --git a/csync/src/csync_update.c b/csync/src/csync_update.c
index 444f11c..a7000c5 100644
--- a/csync/src/csync_update.c
+++ b/csync/src/csync_update.c
@@ -478,7 +478,6 @@ static bool fill_tree_from_db(CSYNC *ctx, const char *uri)
/* File tree walker */
int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn,
unsigned int depth) {
- char errbuf[256] = {0};
char *filename = NULL;
char *d_name = NULL;
csync_vio_handle_t *dh = NULL;
@@ -522,10 +521,7 @@ int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn,
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "asprintf failed!");
}
} else {
- C_STRERROR(errno, errbuf, sizeof(errbuf));
- CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR,
- "opendir failed for %s - %s (errno %d)",
- uri, errbuf, errno);
+ CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "opendir failed for %s - errno %d", uri, errno);
}
goto error;
}
diff --git a/csync/src/std/c_macro.h b/csync/src/std/c_macro.h
index 1c6986e..a4a0e1c 100644
--- a/csync/src/std/c_macro.h
+++ b/csync/src/std/c_macro.h
@@ -55,9 +55,6 @@
/** Get the size of an array */
#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
-/** Macro to make strerror_r work with -Werror=unused-result */
-#define C_STRERROR(errno, buf, size) if(strerror_r(errno, buf, size)) {}
-
/**
* This is a hack to fix warnings. The idea is to use this everywhere that we
* get the "discarding const" warning by the compiler. That doesn't actually
--
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