aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-05-31 06:55:23 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-05-31 06:55:23 +0000
commitf606afeffffcfffba837ad1350bcda7b458b4031 (patch)
tree7992a58ecd831ad8d0ee065f1acfc9df26ddc903 /LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c
parent152b2764c3c719e3e9e34ee60b5db8d99ff2611b (diff)
downloadlufa-f606afeffffcfffba837ad1350bcda7b458b4031.tar.gz
lufa-f606afeffffcfffba837ad1350bcda7b458b4031.tar.bz2
lufa-f606afeffffcfffba837ad1350bcda7b458b4031.zip
Remove void* arithmetic in the USB_GetNextDescriptor() static inline function, to make the header file C++ compatible once again. Implement workaround for an obscure GCC bug which can cause incorrect code generation under some circumstances when the void* is re-cast.
Diffstat (limited to 'LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c')
-rw-r--r--LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c b/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c
index 07a3d4292..ffac8ae0f 100644
--- a/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c
+++ b/LUFA/Drivers/USB/HighLevel/ConfigDescriptor.c
@@ -114,13 +114,13 @@ void USB_GetNextDescriptorOfTypeAfter(uint16_t* const BytesRem,
USB_GetNextDescriptorOfType(BytesRem, CurrConfigLoc, Type);
}
-uint8_t USB_GetNextDescriptorComp(uint16_t* BytesRem, void** CurrConfigLoc, ConfigComparatorPtr_t const ComparatorRoutine)
+uint8_t USB_GetNextDescriptorComp(uint16_t* BytesRem, void** const CurrConfigLoc, ConfigComparatorPtr_t const ComparatorRoutine)
{
uint8_t ErrorCode;
while (*BytesRem)
{
- void* PrevDescLoc = *CurrConfigLoc;
+ uint8_t* PrevDescLoc = *CurrConfigLoc;
uint16_t PrevBytesRem = *BytesRem;
USB_GetNextDescriptor(BytesRem, CurrConfigLoc);