Преглед на файлове

cast buf as void* to fix warning

Mike Frysinger преди 20 години
родител
ревизия
a7334dddd4
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      libc/sysdeps/linux/common/pread_write.c

+ 3 - 1
libc/sysdeps/linux/common/pread_write.c

@@ -186,7 +186,9 @@ weak_alias (__libc_pread64, pread64)
 #ifndef __NR_pwrite
 ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
 {
-	return(__fake_pread_write(fd, buf, count, offset, 1));
+	/* we won't actually be modifying the buffer, 
+	 *just cast it to get rid of warnings */
+	return(__fake_pread_write(fd, (void*)buf, count, offset, 1));
 }
 weak_alias (__libc_pwrite, pwrite)