fix warnings on some systems / format specifier mismatch

Instead of %ld or %lx, use %jd or %jx
for off_t (after casting to intmax_t)

Change-Id: I4cd1831816820d2862b383ff8782e548b2fca294
This commit is contained in:
Christian Soffke 2024-12-05 00:07:12 +01:00
parent 93ecb97693
commit 87452d775e
6 changed files with 70 additions and 60 deletions

View file

@ -231,13 +231,13 @@ static void init_mad(void)
frame.sbsample = &sbsample;
/* We do this so libmad doesn't try to call codec_calloc(). This needs to
* be called before mad_stream_init(), mad_frame_inti() and
* be called before mad_stream_init(), mad_frame_inti() and
* mad_synth_init(). */
frame.overlap = &mad_frame_overlap;
stream.main_data = &mad_main_data;
/* Call mad initialization. Those will zero the arrays frame.overlap,
* frame.sbsample and frame.sbsample_prev. Therefore there is no need to
* frame.sbsample and frame.sbsample_prev. Therefore there is no need to
* zero them here. */
mad_stream_init(&stream);
mad_frame_init(&frame);
@ -270,7 +270,7 @@ static int audio_sync(struct audio_thread_data *td,
time = INVALID_TIMESTAMP;
str = &tmp_str;
str->id = audio_str.id;
}
}
str->hdr.pos = sd->sk.pos;
str->hdr.limit = sd->sk.pos + sd->sk.len;
@ -282,8 +282,9 @@ static int audio_sync(struct audio_thread_data *td,
{
if (audio_buffer(str, STREAM_PM_RANDOM_ACCESS) == STREAM_DATA_END)
{
DEBUGF("audio_sync:STR_DATA_END\n aqu:%ld swl:%ld swr:%ld\n",
(long)audio_queue.used, str->hdr.win_left, str->hdr.win_right);
DEBUGF("audio_sync:STR_DATA_END\n aqu:%ld swl:%jd swr:%jd\n",
(long)audio_queue.used, (intmax_t) str->hdr.win_left,
(intmax_t) str->hdr.win_right);
if (audio_queue.used <= MAD_BUFFER_GUARD)
goto sync_data_end;
}
@ -401,7 +402,7 @@ static void audio_thread_msg(struct audio_thread_data *td)
td->state = TSTATE_EOS;
reply = true;
break;
break;
case STREAM_RESET:
if (td->state == TSTATE_DATA)