(OSX) Fix warnings
This commit is contained in:
parent
e4fa9f178c
commit
1544a3d6e1
|
@ -390,7 +390,7 @@ static void iohidmanager_hid_device_remove(void *data,
|
||||||
|
|
||||||
if (adapter)
|
if (adapter)
|
||||||
{
|
{
|
||||||
struct apple_input_rec_t* tmp;
|
apple_input_rec_t* tmp = NULL;
|
||||||
while(adapter->hats != NULL)
|
while(adapter->hats != NULL)
|
||||||
{
|
{
|
||||||
tmp = adapter->hats;
|
tmp = adapter->hats;
|
||||||
|
@ -547,6 +547,14 @@ static void iohidmanager_hid_device_add(void *data, IOReturn result,
|
||||||
case kHIDPage_GenericDesktop:
|
case kHIDPage_GenericDesktop:
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
|
case kIOHIDElementTypeCollection:
|
||||||
|
case kIOHIDElementTypeInput_ScanCodes:
|
||||||
|
case kIOHIDElementTypeFeature:
|
||||||
|
case kIOHIDElementTypeInput_Button:
|
||||||
|
case kIOHIDElementTypeOutput:
|
||||||
|
case kIOHIDElementTypeInput_Axis:
|
||||||
|
/* TODO/FIXME */
|
||||||
|
break;
|
||||||
case kIOHIDElementTypeInput_Misc:
|
case kIOHIDElementTypeInput_Misc:
|
||||||
switch (use)
|
switch (use)
|
||||||
{
|
{
|
||||||
|
@ -613,6 +621,14 @@ static void iohidmanager_hid_device_add(void *data, IOReturn result,
|
||||||
case kHIDPage_Button:
|
case kHIDPage_Button:
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
|
case kIOHIDElementTypeCollection:
|
||||||
|
case kIOHIDElementTypeFeature:
|
||||||
|
case kIOHIDElementTypeInput_ScanCodes:
|
||||||
|
case kIOHIDElementTypeInput_Misc:
|
||||||
|
case kIOHIDElementTypeInput_Axis:
|
||||||
|
case kIOHIDElementTypeOutput:
|
||||||
|
/* TODO/FIXME */
|
||||||
|
break;
|
||||||
case kIOHIDElementTypeInput_Button:
|
case kIOHIDElementTypeInput_Button:
|
||||||
{
|
{
|
||||||
apple_input_rec_t *btn = (apple_input_rec_t *)malloc(sizeof(apple_input_rec_t));
|
apple_input_rec_t *btn = (apple_input_rec_t *)malloc(sizeof(apple_input_rec_t));
|
||||||
|
@ -687,34 +703,34 @@ static void iohidmanager_hid_device_add(void *data, IOReturn result,
|
||||||
|
|
||||||
error:
|
error:
|
||||||
{
|
{
|
||||||
struct apple_input_rec_t *tmp = NULL;
|
apple_input_rec_t *tmp = NULL;
|
||||||
while(adapter->hats != NULL)
|
while(adapter->hats != NULL)
|
||||||
{
|
{
|
||||||
tmp = adapter->hats;
|
tmp = adapter->hats;
|
||||||
adapter->hats = adapter->hats->next;
|
adapter->hats = adapter->hats->next;
|
||||||
free(tmp);
|
free(tmp);
|
||||||
}
|
}
|
||||||
while(adapter->axes != NULL)
|
while(adapter->axes != NULL)
|
||||||
{
|
{
|
||||||
tmp = adapter->axes;
|
tmp = adapter->axes;
|
||||||
adapter->axes = adapter->axes->next;
|
adapter->axes = adapter->axes->next;
|
||||||
free(tmp);
|
free(tmp);
|
||||||
}
|
}
|
||||||
while(adapter->buttons != NULL)
|
while(adapter->buttons != NULL)
|
||||||
{
|
{
|
||||||
tmp = adapter->buttons;
|
tmp = adapter->buttons;
|
||||||
adapter->buttons = adapter->buttons->next;
|
adapter->buttons = adapter->buttons->next;
|
||||||
free(tmp);
|
free(tmp);
|
||||||
}
|
}
|
||||||
while(tmpAxes != NULL)
|
while(tmpAxes != NULL)
|
||||||
{
|
{
|
||||||
tmp = tmpAxes;
|
tmp = tmpAxes;
|
||||||
tmpAxes = tmpAxes->next;
|
tmpAxes = tmpAxes->next;
|
||||||
free(tmp);
|
free(tmp);
|
||||||
}
|
}
|
||||||
while(tmpButtons != NULL)
|
while(tmpButtons != NULL)
|
||||||
{
|
{
|
||||||
tmp = tmpButtons;
|
tmp = tmpButtons;
|
||||||
tmpButtons = tmpButtons->next;
|
tmpButtons = tmpButtons->next;
|
||||||
free(tmp);
|
free(tmp);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue