mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-13 02:34:48 +08:00
Fix "control reaches end of non-void function" warning
This commit is contained in:
parent
63cd4a9fbb
commit
dbf5e74069
3 changed files with 6 additions and 4 deletions
|
@ -107,6 +107,6 @@ uint32_t uart_get_speed(const serial_port sp);
|
|||
|
||||
/* Reconfigure timeouts
|
||||
*/
|
||||
bool uart_reconfigure_timeouts(serial_port *sp, uint32_t value );
|
||||
int uart_reconfigure_timeouts(serial_port *sp, uint32_t value );
|
||||
#endif // _UART_H_
|
||||
|
||||
|
|
|
@ -73,8 +73,9 @@ struct timeval timeout = {
|
|||
.tv_usec = UART_FPC_CLIENT_RX_TIMEOUT_MS * 1000
|
||||
};
|
||||
|
||||
bool uart_reconfigure_timeouts(serial_port *sp, uint32_t value ) {
|
||||
int uart_reconfigure_timeouts(serial_port *sp, uint32_t value ) {
|
||||
timeout.tv_usec = value * 1000;
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
serial_port uart_open(const char *pcPortName, uint32_t speed) {
|
||||
|
|
|
@ -48,7 +48,7 @@ typedef struct {
|
|||
COMMTIMEOUTS ct; // Serial port time-out configuration
|
||||
} serial_port_windows;
|
||||
|
||||
bool uart_reconfigure_timeouts(serial_port *sp, uint32_t value) {
|
||||
int uart_reconfigure_timeouts(serial_port *sp, uint32_t value) {
|
||||
|
||||
serial_port_windows *spw = (serial_port_windows*)sp;
|
||||
spw->ct.ReadIntervalTimeout = value;
|
||||
|
@ -60,10 +60,11 @@ bool uart_reconfigure_timeouts(serial_port *sp, uint32_t value) {
|
|||
if (!SetCommTimeouts(spw->hPort, &spw->ct)) {
|
||||
uart_close(spw);
|
||||
printf("[!] UART error while setting comm time outs\n");
|
||||
return INVALID_SERIAL_PORT;
|
||||
return PM3_EIO;
|
||||
}
|
||||
|
||||
PurgeComm(spw->hPort, PURGE_RXABORT | PURGE_RXCLEAR);
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
serial_port uart_open(const char *pcPortName, uint32_t speed) {
|
||||
|
|
Loading…
Reference in a new issue