diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2012-02-08 22:14:08 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2012-02-08 22:14:50 -0800 |
commit | 167ffb1c4e431763e30c894131e704bb3599c7c1 (patch) | |
tree | 9a811dd83c39fb779ef93c743cbd408797d42a16 | |
parent | 573b25ecd34dd69ee14c58f752bffdb5709654b9 (diff) | |
download | libpciaccess-167ffb1c4e431763e30c894131e704bb3599c7c1.tar.gz libpciaccess-167ffb1c4e431763e30c894131e704bb3599c7c1.tar.bz2 libpciaccess-167ffb1c4e431763e30c894131e704bb3599c7c1.zip |
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 <alan.coopersmith@oracle.com>
-rw-r--r-- | src/solx_devfs.c | 8 |
1 files changed, 4 insertions, 4 deletions
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; |