Fixing build on clang.

pull/1078/head
John Hall 2020-12-09 14:03:18 -08:00
rodzic b414ddc0a0
commit 4cf8b79099
3 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -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;
}

Wyświetl plik

@ -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);
}

Wyświetl plik

@ -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");