Skip to content

Commit

Permalink
correct format string
Browse files Browse the repository at this point in the history
  • Loading branch information
deanlee committed Jul 22, 2023
1 parent 8b03ec1 commit a88a75c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion common/clutil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void cl_print_info(cl_platform_id platform, cl_device_id device) {
LOGD("name: %s", get_device_info(device, CL_DEVICE_NAME).c_str());
LOGD("device version: %s", get_device_info(device, CL_DEVICE_VERSION).c_str());
LOGD("max work group size: %zu", work_group_size);
LOGD("type = %lu = %s", device_type, type_str);
LOGD("type = %d, %s", (int)device_type, type_str);
}

void cl_print_build_errors(cl_program program, cl_device_id device) {
Expand Down
4 changes: 2 additions & 2 deletions selfdrive/boardd/boardd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ void can_send_thread(std::vector<Panda *> pandas, bool fake_send) {
LOGT("sendcan sent to panda: %s", (panda->hw_serial()).c_str());
}
} else {
LOGE("sendcan too old to send: %lu, %lu", nanos_since_boot(), event.getLogMonoTime());
LOGE("sendcan too old to send: %" PRIu64 ", %" PRIu64, nanos_since_boot(), event.getLogMonoTime());
}
}
}
Expand Down Expand Up @@ -277,7 +277,7 @@ void can_recv_thread(std::vector<Panda *> pandas) {
std::this_thread::sleep_for(std::chrono::nanoseconds(remaining));
} else {
if (ignition) {
LOGW("missed cycles (%lu) %ld", (int)-1*remaining/dt, remaining);
LOGW("missed cycles (%lu) %lld", (unsigned long)(-1*remaining/dt), (long long)remaining);
}
next_frame_time = cur_time;
}
Expand Down
2 changes: 1 addition & 1 deletion system/loggerd/encoderd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void encoder_thread(EncoderdState *s, const LogCameraInfo &cam_info) {
// detect loop around and drop the frames
if (buf->get_frame_id() != extra.frame_id) {
if (!lagging) {
LOGE("encoder %s lag buffer id: %lu extra id: %d", cam_info.thread_name, buf->get_frame_id(), extra.frame_id);
LOGE("encoder %s lag buffer id: %" PRIu64 " extra id: %d", cam_info.thread_name, buf->get_frame_id(), extra.frame_id);
lagging = true;
}
continue;
Expand Down
2 changes: 1 addition & 1 deletion system/loggerd/loggerd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ void loggerd_thread() {

if ((++msg_count % 1000) == 0) {
double seconds = (millis_since_boot() - start_ts) / 1000.0;
LOGD("%lu messages, %.2f msg/sec, %.2f KB/sec", msg_count, msg_count / seconds, bytes_count * 0.001 / seconds);
LOGD("%" PRIu64 " messages, %.2f msg/sec, %.2f KB/sec", msg_count, msg_count / seconds, bytes_count * 0.001 / seconds);
}

count++;
Expand Down
2 changes: 1 addition & 1 deletion system/ubloxd/ublox_msg.cc
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ kj::Array<capnp::word> UbloxMsgParser::parse_glonass_ephemeris(ubx_t::rxm_sfrbx_
eph.setP4(data->p4());
eph.setSvURA(glonass_URA_lookup.at(data->f_t()));
if (msg->sv_id() != data->n()) {
LOGE("SV_ID != SLOT_NUMBER: %d %lu", msg->sv_id(), data->n());
LOGE("SV_ID != SLOT_NUMBER: %d %" PRIu64, msg->sv_id(), data->n());
}
eph.setSvType(data->m());
}
Expand Down

0 comments on commit a88a75c

Please sign in to comment.