[klibc] [klibc:master] Clean up clang warnings

klibc-bot for Bill Wendling morbo at google.com
Sat Jul 25 13:57:05 PDT 2020


Commit-ID:  0dd950265ef9c8eced83ec69e1988fd08706f667
Gitweb:     http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=0dd950265ef9c8eced83ec69e1988fd08706f667
Author:     Bill Wendling <morbo at google.com>
AuthorDate: Sun, 29 Mar 2020 04:38:33 -0700
Committer:  Ben Hutchings <ben at decadent.org.uk>
CommitDate: Sat, 25 Jul 2020 20:45:34 +0100

[klibc] Clean up clang warnings

Add or remove casts of the "void *" argument of ioctl.

Signed-off-by: Bill Wendling <morbo at google.com>
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>

---
 usr/kinit/initrd.c       | 2 +-
 usr/kinit/ramdisk_load.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/usr/kinit/initrd.c b/usr/kinit/initrd.c
index 7eece2ce..5833f2f2 100644
--- a/usr/kinit/initrd.c
+++ b/usr/kinit/initrd.c
@@ -153,7 +153,7 @@ static int run_linuxrc(int argc, char *argv[], dev_t root_dev)
 			int olddev = open(ramdisk_name, O_RDWR);
 			umount2("/old", MNT_DETACH);
 			if (olddev < 0 ||
-			    ioctl(olddev, BLKFLSBUF, (long)0) ||
+			    ioctl(olddev, BLKFLSBUF, 0) ||
 			    close(olddev)) {
 				fprintf(stderr,
 					"%s: Cannot flush initrd contents\n",
diff --git a/usr/kinit/ramdisk_load.c b/usr/kinit/ramdisk_load.c
index f43339c8..e3e15d81 100644
--- a/usr/kinit/ramdisk_load.c
+++ b/usr/kinit/ramdisk_load.c
@@ -34,7 +34,7 @@ static int change_disk(const char *devpath, int rfd, int disk)
 			ioctl(rfd, CDROMEJECT, 0);
 		} else {
 			/* Non-ejectable floppy */
-			ioctl(rfd, FDRESET, FD_RESET_IF_NEEDED);
+			ioctl(rfd, FDRESET, (void *)FD_RESET_IF_NEEDED);
 		}
 	}
 	close(rfd);


More information about the klibc mailing list