From 167ffb1c4e431763e30c894131e704bb3599c7c1 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Wed, 8 Feb 2012 22:14:08 -0800 Subject: solx_devfs.c: fix gcc warnings about casting away const when reading data solx_devfs.c: In function `pci_device_solx_devfs_write': solx_devfs.c:1085: warning: cast discards qualifiers from pointer target type solx_devfs.c:1089: warning: cast discards qualifiers from pointer target type solx_devfs.c:1093: warning: cast discards qualifiers from pointer target type solx_devfs.c:1097: warning: cast discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith --- src/solx_devfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/solx_devfs.c b/src/solx_devfs.c index 6920e0f..5e91a14 100644 --- a/src/solx_devfs.c +++ b/src/solx_devfs.c @@ -1082,19 +1082,19 @@ pci_device_solx_devfs_write( struct pci_device * dev, const void * data, switch (size) { case 1: cfg_prg.acc_attr = PCITOOL_ACC_ATTR_SIZE_1 + NATIVE_ENDIAN; - cfg_prg.data = *((uint8_t *)data); + cfg_prg.data = *((const uint8_t *)data); break; case 2: cfg_prg.acc_attr = PCITOOL_ACC_ATTR_SIZE_2 + NATIVE_ENDIAN; - cfg_prg.data = *((uint16_t *)data); + cfg_prg.data = *((const uint16_t *)data); break; case 4: cfg_prg.acc_attr = PCITOOL_ACC_ATTR_SIZE_4 + NATIVE_ENDIAN; - cfg_prg.data = *((uint32_t *)data); + cfg_prg.data = *((const uint32_t *)data); break; case 8: cfg_prg.acc_attr = PCITOOL_ACC_ATTR_SIZE_8 + NATIVE_ENDIAN; - cfg_prg.data = *((uint64_t *)data); + cfg_prg.data = *((const uint64_t *)data); break; default: return EINVAL; -- cgit v1.2.3