mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-04-11 16:37:45 -04:00
pcm: Fix up some compile warnings that show up under some sim builds
firmware/pcm_mixer.c:36:35: warning: conversion from ‘long unsigned int’ to ‘unsigned int’ changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
36 | static unsigned int mixer_sampr = -1UL;
|
firmware/pcm_mixer.c:269:21: warning: comparison is always false due to limited range of data type [-Wtype-limits]
269 | if (mixer_sampr == -1UL)
| ^~
So drop the 'L' and everything is peachy.
Change-Id: I9440d3300931be229c6c4b01bdc1d09b55c34d88
This commit is contained in:
parent
daef425c59
commit
a84a38dd87
2 changed files with 4 additions and 4 deletions
|
|
@ -202,7 +202,7 @@ void pcm_do_peak_calculation(struct pcm_peaks *peaks, bool active,
|
|||
if (active)
|
||||
{
|
||||
struct pcm_sink* sink = sinks[cur_sink];
|
||||
if (sink->configured_freq == -1UL)
|
||||
if (sink->configured_freq == -1U)
|
||||
{
|
||||
logf("not configured yet");
|
||||
return;
|
||||
|
|
@ -250,7 +250,7 @@ void pcm_init(void)
|
|||
for(size_t i = 0; i < ARRAYLEN(sinks); i += 1) {
|
||||
struct pcm_sink* sink = sinks[i];
|
||||
sink->pending_freq = sink->caps.default_freq;
|
||||
sink->configured_freq = -1UL;
|
||||
sink->configured_freq = -1U;
|
||||
sink->pcm_is_ready = false;
|
||||
sink->ops.init();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
before the last samples are sent to the codec and so things are done in
|
||||
parallel (as much as possible) with sending-out data. */
|
||||
|
||||
static unsigned int mixer_sampr = -1UL;
|
||||
static unsigned int mixer_sampr = -1U;
|
||||
static unsigned int mix_frame_size = MIX_FRAME_SAMPLES*4;
|
||||
|
||||
/* Define this to nonzero to add a marker pulse at each frame start */
|
||||
|
|
@ -266,7 +266,7 @@ static void mixer_start_pcm(void)
|
|||
#endif
|
||||
|
||||
/* Requires a shared global sample rate for all channels */
|
||||
if (mixer_sampr == -1UL)
|
||||
if (mixer_sampr == -1U)
|
||||
mixer_sampr = pcm_get_frequency();
|
||||
else
|
||||
pcm_set_frequency(mixer_sampr);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue