Skip to content

Commit 63ed155

Browse files
committed
Cleanup.
1 parent c3f96e1 commit 63ed155

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

core/usb/dusb.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -857,14 +857,15 @@ int usb_dusb_device(usb_event_t *event) {
857857
}
858858
}
859859
event->context = context;
860-
return dusb_transition(event, DUSB_INIT_STATE);
860+
break;
861861
case USB_RESET_EVENT:
862862
switch (context->state) {
863863
case DUSB_RESET_STATE:
864-
return dusb_transition(event, DUSB_RESET_RECOVERY_STATE);
864+
break;
865865
default:
866866
return dusb_transition(event, DUSB_INVALID_STATE);
867867
}
868+
break;
868869
case USB_TRANSFER_EVENT:
869870
command = context->command;
870871
buffer = transfer->buffer;
@@ -1202,16 +1203,16 @@ int usb_dusb_device(usb_event_t *event) {
12021203
default:
12031204
return dusb_transition(event, DUSB_INVALID_STATE);
12041205
}
1205-
return dusb_transition(event, context->state + 1);
1206+
break;
12061207
case USB_TIMER_EVENT:
12071208
switch (context->state) {
12081209
case DUSB_INIT_STATE:
1209-
return dusb_transition(event, DUSB_RESET_STATE);
12101210
case DUSB_RESET_RECOVERY_STATE:
1211-
return dusb_transition(event, DUSB_SET_ADDRESS_STATE);
1211+
break;
12121212
default:
12131213
return 0;
12141214
}
1215+
break;
12151216
case USB_DESTROY_EVENT:
12161217
if (event->progress_handler) {
12171218
event->progress_handler(event->progress_context, 1, 1);
@@ -1231,4 +1232,5 @@ int usb_dusb_device(usb_event_t *event) {
12311232
default:
12321233
return EINVAL;
12331234
}
1235+
return dusb_transition(event, context->state + 1);
12341236
}

core/usb/usb.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
#include "../debug/debug.h"
88

99
#include <errno.h>
10-
#include <string.h>
10+
#include <stddef.h>
1111
#include <stdio.h>
12+
#include <string.h>
1213

1314
#define CONTROL_MPS 0x40
1415

gui/qt/emuthread.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#include "../../tests/autotester/crc32.hpp"
1010
#include "capture/animated-png.h"
1111

12+
#include <QtCore/QVector>
13+
1214
#include <cassert>
1315
#include <cstdarg>
1416
#include <thread>

0 commit comments

Comments
 (0)