bluez5: fix compilation and warnings

This commit is contained in:
Pauli Virtanen 2025-07-11 17:56:44 +03:00 committed by Wim Taymans
parent d10249d0ce
commit 5e79d0fb01
2 changed files with 7 additions and 7 deletions

View file

@ -106,9 +106,9 @@ static inline ssize_t spa_bt_send(int fd, const void *buf, size_t size,
static inline int spa_bt_latency_recv_errqueue(struct spa_bt_latency *lat, int fd, struct spa_log *log) static inline int spa_bt_latency_recv_errqueue(struct spa_bt_latency *lat, int fd, struct spa_log *log)
{ {
struct { union {
struct cmsghdr cm; char buf[CMSG_SPACE(32 * sizeof(struct scm_timestamping))];
char control[512]; struct cmsghdr align;
} control; } control;
if (!lat->enabled) if (!lat->enabled)
@ -122,8 +122,8 @@ static inline int spa_bt_latency_recv_errqueue(struct spa_bt_latency *lat, int f
struct msghdr msg = { struct msghdr msg = {
.msg_iov = &data, .msg_iov = &data,
.msg_iovlen = 1, .msg_iovlen = 1,
.msg_control = &control, .msg_control = control.buf,
.msg_controllen = sizeof(control), .msg_controllen = sizeof(control.buf),
}; };
struct cmsghdr *cmsg; struct cmsghdr *cmsg;
struct scm_timestamping *tss = NULL; struct scm_timestamping *tss = NULL;

View file

@ -646,7 +646,7 @@ static uint64_t get_reference_time(struct impl *this, uint64_t *duration_ns_ret)
/ port->current_format.info.raw.rate; / port->current_format.info.raw.rate;
} }
if (this->process_rate_diff) if (this->process_rate_diff > 0)
t = (int64_t)(t / this->process_rate_diff); t = (int64_t)(t / this->process_rate_diff);
return this->process_time + t; return this->process_time + t;
@ -689,7 +689,7 @@ static int setup_matching(struct impl *this)
* different rate, we as follower must compensate. * different rate, we as follower must compensate.
*/ */
if (this->following && SPA_LIKELY(this->position && if (this->following && SPA_LIKELY(this->position &&
this->position->clock.rate_diff)) this->position->clock.rate_diff > 0))
port->rate_match->rate /= this->position->clock.rate_diff; port->rate_match->rate /= this->position->clock.rate_diff;
SPA_FLAG_UPDATE(port->rate_match->flags, SPA_IO_RATE_MATCH_FLAG_ACTIVE, this->following); SPA_FLAG_UPDATE(port->rate_match->flags, SPA_IO_RATE_MATCH_FLAG_ACTIVE, this->following);