mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 05:13:46 -07: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
|
/* 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_
|
#endif // _UART_H_
|
||||||
|
|
||||||
|
|
|
@ -73,8 +73,9 @@ struct timeval timeout = {
|
||||||
.tv_usec = UART_FPC_CLIENT_RX_TIMEOUT_MS * 1000
|
.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;
|
timeout.tv_usec = value * 1000;
|
||||||
|
return PM3_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
serial_port uart_open(const char *pcPortName, uint32_t speed) {
|
serial_port uart_open(const char *pcPortName, uint32_t speed) {
|
||||||
|
|
|
@ -48,7 +48,7 @@ typedef struct {
|
||||||
COMMTIMEOUTS ct; // Serial port time-out configuration
|
COMMTIMEOUTS ct; // Serial port time-out configuration
|
||||||
} serial_port_windows;
|
} 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;
|
serial_port_windows *spw = (serial_port_windows*)sp;
|
||||||
spw->ct.ReadIntervalTimeout = value;
|
spw->ct.ReadIntervalTimeout = value;
|
||||||
|
@ -60,10 +60,11 @@ bool uart_reconfigure_timeouts(serial_port *sp, uint32_t value) {
|
||||||
if (!SetCommTimeouts(spw->hPort, &spw->ct)) {
|
if (!SetCommTimeouts(spw->hPort, &spw->ct)) {
|
||||||
uart_close(spw);
|
uart_close(spw);
|
||||||
printf("[!] UART error while setting comm time outs\n");
|
printf("[!] UART error while setting comm time outs\n");
|
||||||
return INVALID_SERIAL_PORT;
|
return PM3_EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
PurgeComm(spw->hPort, PURGE_RXABORT | PURGE_RXCLEAR);
|
PurgeComm(spw->hPort, PURGE_RXABORT | PURGE_RXCLEAR);
|
||||||
|
return PM3_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
serial_port uart_open(const char *pcPortName, uint32_t speed) {
|
serial_port uart_open(const char *pcPortName, uint32_t speed) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue