Skip to content

Commit

Permalink
Merge pull request #1078 from simplerobot/st-trace
Browse files Browse the repository at this point in the history
Bugfixes for compilation with clang
  • Loading branch information
Nightwalker-87 committed Dec 12, 2020
2 parents 6329dbf + 4cf8b79 commit adbc18c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/st-trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/stlink-lib/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit adbc18c

Please sign in to comment.