On Fri, Mar 24, 2023 at 05:01:58PM +0100, Alexander Heinrich wrote: > For the string to int conversion functions, the return values for the test cases > in pcm-test.conf are non-negative and in the range of unsigned int, so I just > cast them to unsigned int. That sounds like you're masking some issue rather than fixing it, but... > Please let me know if I can further improve on my patch (it is my first)! It might be easier to split the different kinds of change up into separate patches, it'd make it easier to follow what's going on. > + phys_width = snd_pcm_format_physical_width(format); > + if (phys_width < 0) > + ksft_exit_fail_msg("Unknown PCM format\n"); > samples = realloc(samples, (rate * channels * > - snd_pcm_format_physical_width(format)) / 8); > + (unsigned int)phys_width) / 8); ...this isn't a formatting function, it's realloc()?