[libvirt] Fix compile errors in 'safezero()' functions in util.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>



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

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]