kopia lustrzana https://github.com/stlink-org/stlink
Fixing build on clang.
rodzic
b414ddc0a0
commit
4cf8b79099
|
@ -410,7 +410,7 @@ static bool read_trace(stlink_t* stlink, st_trace_t* trace) {
|
|||
|
||||
static void check_for_configuration_error(stlink_t* stlink, st_trace_t* trace, uint32_t trace_frequency) {
|
||||
// Only check configuration one time after the first 10 seconds of running.
|
||||
uint32_t elapsed_time_s = time(NULL) - trace->start_time;
|
||||
time_t elapsed_time_s = time(NULL) - trace->start_time;
|
||||
if (trace->configuration_checked || elapsed_time_s < 10) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -11,5 +11,5 @@
|
|||
unsigned time_ms() {
|
||||
struct timeval tv;
|
||||
gettimeofday(&tv, NULL);
|
||||
return (unsigned)tv.tv_sec * 1000 + tv.tv_usec / 1000;
|
||||
return (unsigned)(tv.tv_sec * 1000 + tv.tv_usec / 1000);
|
||||
}
|
||||
|
|
|
@ -1109,7 +1109,7 @@ int _stlink_usb_read_trace(stlink_t* sl, uint8_t* buf, size_t size) {
|
|||
return -1;
|
||||
}
|
||||
|
||||
size_t trace_count = read_uint16(sl->q_buf, 0);
|
||||
uint16_t trace_count = read_uint16(sl->q_buf, 0);
|
||||
|
||||
if (trace_count > size) {
|
||||
ELOG("read_trace insufficient buffer length\n");
|
||||
|
|
Ładowanie…
Reference in New Issue