Hi! Fix compile errors in 'safezero()' functions in util.c Commit 70e7672184ff639856d5f2f3bf7849464031dff9 introduced some compile errors because of the unsued 'flags' parameter in all three version of the 'safezero()' function. Signed-Off-By: Maximilian Wilhelm <max rfc2324 org> The attached patch fixes this. Ciao Max -- Follow the white penguin.
diff --git a/src/util.c b/src/util.c
index 93d2937..a40ff17 100644
--- a/src/util.c
+++ b/src/util.c
@@ -121,14 +121,14 @@ ssize_t safewrite(int fd, const void *buf, size_t count)
}
#ifdef HAVE_POSIX_FALLOCATE
-int safezero(int fd, int flags, off_t offset, off_t len)
+int safezero(int fd, int flags ATTRIBUTE_UNUSED, off_t offset, off_t len)
{
return posix_fallocate(fd, offset, len);
}
#else
#ifdef HAVE_MMAP
-int safezero(int fd, int flags, off_t offset, off_t len)
+int safezero(int fd, int flags ATTRIBUTE_UNUSED, off_t offset, off_t len)
{
int r;
char *buf;
@@ -152,7 +152,7 @@ int safezero(int fd, int flags, off_t offset, off_t len)
#else /* HAVE_MMAP */
-int safezero(int fd, int flags, off_t offset, off_t len)
+int safezero(int fd, int flags ATTRIBUTE_UNUSED, off_t offset, off_t len)
{
int r;
char *buf;
Attachment:
signature.asc
Description: Digital signature