From c8939186adfd795a91e9b2745ba4cb05a1cbc4c1 Mon Sep 17 00:00:00 2001 From: matt <14ms124@queensu.ca> Date: Sun, 15 May 2022 18:41:05 -0400 Subject: [PATCH] Add fixes for warnings Acknowledge that memcpy doesn't take a volatile pointer, this is ok because memcpy doesn't mess around with the memory --- kernel/src/devices/sata.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/src/devices/sata.c b/kernel/src/devices/sata.c index c478a1d..63f87c4 100644 --- a/kernel/src/devices/sata.c +++ b/kernel/src/devices/sata.c @@ -172,7 +172,7 @@ bool sata_identify_device(sata_device_t* dev) { cmd.command = ATA_CMD_IDENTIFY_DEV; // move command to - memcpy(tbl,&cmd,sizeof(cmd)); + memcpy((void*)tbl,(const void*)&cmd,sizeof(cmd)); // issue command port->ci = 0x01; @@ -246,7 +246,7 @@ bool sata_read_device(sata_device_t* dev, uint32_t block_num_l, uint16_t block_n cmd.lba5 = (block_num_h >> 8) & 0xFF; // move command to table - memcpy(tbl,&cmd,sizeof(cmd)); + memcpy((void*)tbl,(const void*)&cmd,sizeof(cmd)); // issue command port->ci = 0x01; @@ -297,7 +297,7 @@ bool sata_write_device(sata_device_t* dev, uint32_t block_num_l, uint16_t block_ memcpy(dev->data_base_virt, buf, SATA_BLOCK_SIZE); // move command to table - memcpy(tbl,&cmd,sizeof(cmd)); + memcpy((void*)tbl,(const void*)&cmd,sizeof(cmd)); // issue command port->ci = 0x01;