Fix warning when not compiled for UID auto-selection mode.
[pub/USBasp.git] / Demos / Host / ClassDriver / MouseHostWithParser / MouseHostWithParser.c
index ef7835e..7482b01 100644 (file)
@@ -159,14 +159,11 @@ int main(void)
                                                {
                                                        int16_t DeltaMovement = HID_ALIGN_DATA(ReportItem, int16_t);
                                                        
                                                {
                                                        int16_t DeltaMovement = HID_ALIGN_DATA(ReportItem, int16_t);
                                                        
-                                                       if (ReportItem->Attributes.Usage.Usage == USAGE_X)
+                                                       if (DeltaMovement)
                                                        {
                                                        {
-                                                               if (DeltaMovement)
+                                                               if (ReportItem->Attributes.Usage.Usage == USAGE_X)
                                                                  LEDMask |= ((DeltaMovement > 0) ? LEDS_LED1 : LEDS_LED2);
                                                                  LEDMask |= ((DeltaMovement > 0) ? LEDS_LED1 : LEDS_LED2);
-                                                       }
-                                                       else
-                                                       {
-                                                               if (DeltaMovement)
+                                                               else
                                                                  LEDMask |= ((DeltaMovement > 0) ? LEDS_LED3 : LEDS_LED4);
                                                        }
                                                }
                                                                  LEDMask |= ((DeltaMovement > 0) ? LEDS_LED3 : LEDS_LED4);
                                                        }
                                                }
@@ -240,7 +237,8 @@ void EVENT_USB_Host_HostError(const uint8_t ErrorCode)
 /** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while
  *  enumerating an attached USB device.
  */
 /** Event handler for the USB_DeviceEnumerationFailed event. This indicates that a problem occurred while
  *  enumerating an attached USB device.
  */
-void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode)
+void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode,
+                                            const uint8_t SubErrorCode)
 {
        printf_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"
                                 " -- Error Code %d\r\n"
 {
        printf_P(PSTR(ESC_FG_RED "Dev Enum Error\r\n"
                                 " -- Error Code %d\r\n"
@@ -259,7 +257,7 @@ void EVENT_USB_Host_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8
  *
  *  \return Boolean true if the item should be stored into the HID report structure, false if it should be discarded
  */
  *
  *  \return Boolean true if the item should be stored into the HID report structure, false if it should be discarded
  */
-bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_t* CurrentItem)
+bool CALLBACK_HIDParser_FilterHIDReportItem(HID_ReportItem_t* const CurrentItem)
 {
        bool IsMouse = false;
 
 {
        bool IsMouse = false;