Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfixes for compilation with clang #1078

Merged
merged 1 commit into from
Dec 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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/helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
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