Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+4 -4
+2 -2
firmware/pcm.c
··· 202 202 if (active) 203 203 { 204 204 struct pcm_sink* sink = sinks[cur_sink]; 205 - if (sink->configured_freq == -1UL) 205 + if (sink->configured_freq == -1U) 206 206 { 207 207 logf("not configured yet"); 208 208 return; ··· 250 250 for(size_t i = 0; i < ARRAYLEN(sinks); i += 1) { 251 251 struct pcm_sink* sink = sinks[i]; 252 252 sink->pending_freq = sink->caps.default_freq; 253 - sink->configured_freq = -1UL; 253 + sink->configured_freq = -1U; 254 254 sink->pcm_is_ready = false; 255 255 sink->ops.init(); 256 256 }
+2 -2
firmware/pcm_mixer.c
··· 33 33 before the last samples are sent to the codec and so things are done in 34 34 parallel (as much as possible) with sending-out data. */ 35 35 36 - static unsigned int mixer_sampr = -1UL; 36 + static unsigned int mixer_sampr = -1U; 37 37 static unsigned int mix_frame_size = MIX_FRAME_SAMPLES*4; 38 38 39 39 /* Define this to nonzero to add a marker pulse at each frame start */ ··· 266 266 #endif 267 267 268 268 /* Requires a shared global sample rate for all channels */ 269 - if (mixer_sampr == -1UL) 269 + if (mixer_sampr == -1U) 270 270 mixer_sampr = pcm_get_frequency(); 271 271 else 272 272 pcm_set_frequency(mixer_sampr);