mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-07-20 17:55:41 +00:00
treewide: fix some format string issues
Use the proper specifier, and cast to a known type where the type is not guaranteed by any standard. See #3975
This commit is contained in:
parent
bdca7cb1a0
commit
6a26e6dd3f
|
@ -6514,7 +6514,7 @@ static inline void get_frame_times(struct client *c, struct frame_times *times)
|
||||||
u1 = c->jack_position.unique_1;
|
u1 = c->jack_position.unique_1;
|
||||||
*times = c->jack_times;
|
*times = c->jack_times;
|
||||||
if (++count == 10) {
|
if (++count == 10) {
|
||||||
pw_log_warn("could not get snapshot %lu %lu", u1, c->jack_position.unique_2);
|
pw_log_warn("could not get snapshot %" PRIu64 " %" PRIu64, u1, c->jack_position.unique_2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} while (u1 != c->jack_position.unique_2);
|
} while (u1 != c->jack_position.unique_2);
|
||||||
|
@ -6807,7 +6807,7 @@ jack_transport_state_t jack_transport_query (const jack_client_t *client,
|
||||||
if (pos != NULL)
|
if (pos != NULL)
|
||||||
*pos = c->jack_position;
|
*pos = c->jack_position;
|
||||||
if (++count == 10) {
|
if (++count == 10) {
|
||||||
pw_log_warn("could not get snapshot %lu %lu", u1, c->jack_position.unique_2);
|
pw_log_warn("could not get snapshot %" PRIu64 " %" PRIu64, u1, c->jack_position.unique_2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} while (u1 != c->jack_position.unique_2);
|
} while (u1 != c->jack_position.unique_2);
|
||||||
|
|
|
@ -832,7 +832,7 @@ static int negotiate_formats(struct data *data)
|
||||||
if ((res = spa_node_port_use_buffers(data->source_node,
|
if ((res = spa_node_port_use_buffers(data->source_node,
|
||||||
SPA_DIRECTION_OUTPUT, 0, 0, data->source_buffers, 1)) < 0)
|
SPA_DIRECTION_OUTPUT, 0, 0, data->source_buffers, 1)) < 0)
|
||||||
return res;
|
return res;
|
||||||
printf("allocated and assigned buffer(%ld) to source node %p\n", buffer_size, data->source_node);
|
printf("allocated and assigned buffer (%zu) to source node %p\n", buffer_size, data->source_node);
|
||||||
if ((res = spa_node_port_use_buffers(data->sink_node,
|
if ((res = spa_node_port_use_buffers(data->sink_node,
|
||||||
SPA_DIRECTION_INPUT, 0, 0, data->source_buffers, 1)) < 0)
|
SPA_DIRECTION_INPUT, 0, 0, data->source_buffers, 1)) < 0)
|
||||||
return res;
|
return res;
|
||||||
|
|
|
@ -92,8 +92,8 @@ impl_log_logtv(void *object,
|
||||||
if (impl->timestamp) {
|
if (impl->timestamp) {
|
||||||
struct timespec now;
|
struct timespec now;
|
||||||
clock_gettime(CLOCK_MONOTONIC_RAW, &now);
|
clock_gettime(CLOCK_MONOTONIC_RAW, &now);
|
||||||
spa_scnprintf(timestamp, sizeof(timestamp), "[%05lu.%06lu]",
|
spa_scnprintf(timestamp, sizeof(timestamp), "[%05jd.%06jd]",
|
||||||
(now.tv_sec & 0x1FFFFFFF) % 100000, now.tv_nsec / 1000);
|
(intmax_t) (now.tv_sec & 0x1FFFFFFF) % 100000, (intmax_t) now.tv_nsec / 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (topic && topic->topic)
|
if (topic && topic->topic)
|
||||||
|
|
|
@ -754,7 +754,8 @@ int message_dump(enum spa_log_level level, const char *prefix, struct message *m
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
if ((res = read_timeval(m, &tv)) < 0)
|
if ((res = read_timeval(m, &tv)) < 0)
|
||||||
return res;
|
return res;
|
||||||
pw_log(level, "%s %u: timeval: %lu:%lu", prefix, o, tv.tv_sec, tv.tv_usec);
|
pw_log(level, "%s %u: timeval: %jd:%jd", prefix, o,
|
||||||
|
(intmax_t) tv.tv_sec, (intmax_t) tv.tv_usec);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TAG_CHANNEL_MAP:
|
case TAG_CHANNEL_MAP:
|
||||||
|
|
|
@ -204,7 +204,7 @@ static int send_object_event(struct client *client, struct pw_manager_object *o,
|
||||||
{
|
{
|
||||||
uint32_t event = 0, mask = 0, res_index = o->index;
|
uint32_t event = 0, mask = 0, res_index = o->index;
|
||||||
|
|
||||||
pw_log_debug("index:%d id:%d %08lx type:%u", o->index, o->id, o->change_mask, type);
|
pw_log_debug("index:%d id:%d %08" PRIx64 " type:%u", o->index, o->id, o->change_mask, type);
|
||||||
|
|
||||||
if (pw_manager_object_is_sink(o) && o->change_mask & PW_MANAGER_OBJECT_FLAG_SINK) {
|
if (pw_manager_object_is_sink(o) && o->change_mask & PW_MANAGER_OBJECT_FLAG_SINK) {
|
||||||
client_queue_subscribe_event(client,
|
client_queue_subscribe_event(client,
|
||||||
|
|
Loading…
Reference in a new issue