summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-12-31 18:06:57 -0800
committerJeremy Allison <jra@samba.org>2008-12-31 18:06:57 -0800
commit07e0094365e8dc360a83eec2e7cf9b1d5d8d6d00 (patch)
tree412f448d68b4b0f36c5b330a1f3eef77acf12a2f /source3/modules
parentbb23f5725f538d14b2ccec0463cfb1136be3ebd0 (diff)
downloadsamba-07e0094365e8dc360a83eec2e7cf9b1d5d8d6d00.tar.gz
samba-07e0094365e8dc360a83eec2e7cf9b1d5d8d6d00.tar.bz2
samba-07e0094365e8dc360a83eec2e7cf9b1d5d8d6d00.zip
Fix all warnings in source3 with gcc4.3.
Jeremy.
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_netatalk.c8
-rw-r--r--source3/modules/vfs_recycle.c13
2 files changed, 15 insertions, 6 deletions
diff --git a/source3/modules/vfs_netatalk.c b/source3/modules/vfs_netatalk.c
index ca7085ca18..e2fa0fb88a 100644
--- a/source3/modules/vfs_netatalk.c
+++ b/source3/modules/vfs_netatalk.c
@@ -367,7 +367,9 @@ static int atalk_chown(struct vfs_handle_struct *handle, const char *path, uid_t
goto exit_chown;
}
- chown(adbl_path, uid, gid);
+ if (chown(adbl_path, uid, gid) == -1) {
+ DEBUG(3, ("ATALK: chown error %s\n", strerror(errno)));
+ }
exit_chown:
talloc_destroy(ctx);
@@ -399,7 +401,9 @@ static int atalk_lchown(struct vfs_handle_struct *handle, const char *path, uid_
goto exit_lchown;
}
- lchown(adbl_path, uid, gid);
+ if (lchown(adbl_path, uid, gid) == -1) {
+ DEBUG(3, ("ATALK: lchown error %s\n", strerror(errno)));
+ }
exit_lchown:
talloc_destroy(ctx);
diff --git a/source3/modules/vfs_recycle.c b/source3/modules/vfs_recycle.c
index acc1936e5f..cb985e1be2 100644
--- a/source3/modules/vfs_recycle.c
+++ b/source3/modules/vfs_recycle.c
@@ -525,7 +525,9 @@ static int recycle_unlink(vfs_handle_struct *handle, const char *file_name)
}
if (recycle_keep_dir_tree(handle) == True) {
- asprintf(&temp_name, "%s/%s", repository, path_name);
+ if (asprintf(&temp_name, "%s/%s", repository, path_name) == -1) {
+ ALLOC_CHECK(temp_name, done);
+ }
} else {
temp_name = SMB_STRDUP(repository);
}
@@ -543,8 +545,9 @@ static int recycle_unlink(vfs_handle_struct *handle, const char *file_name)
}
}
- asprintf(&final_name, "%s/%s", temp_name, base);
- ALLOC_CHECK(final_name, done);
+ if (asprintf(&final_name, "%s/%s", temp_name, base) == -1) {
+ ALLOC_CHECK(final_name, done);
+ }
DEBUG(10, ("recycle: recycled file name: %s\n", final_name)); /* new filename with path */
/* check if we should delete file from recycle bin */
@@ -561,7 +564,9 @@ static int recycle_unlink(vfs_handle_struct *handle, const char *file_name)
i = 1;
while (recycle_file_exist(handle, final_name)) {
SAFE_FREE(final_name);
- asprintf(&final_name, "%s/Copy #%d of %s", temp_name, i++, base);
+ if (asprintf(&final_name, "%s/Copy #%d of %s", temp_name, i++, base) == -1) {
+ ALLOC_CHECK(final_name, done);
+ }
}
DEBUG(10, ("recycle: Moving %s to %s\n", file_name, final_name));