Message ID | 20240506075419.301780-1-perex@perex.cz (mailing list archive) |
---|---|
State | Accepted |
Commit | b9112b17950c955071abfd4331d4daa162d6ec4d |
Headers | show |
Series | selftests/alsa: make dump_config_tree() as void function | expand |
On Mon, May 06, 2024 at 09:54:19AM +0200, Jaroslav Kysela wrote: > dump_config_tree() is declared to return an int, but the compiler cannot > prove that it always returns any value at all. This leads to a clang > warning, when building via: Reviewed-by: Mark Brown <broonie@kernel.org>
On Mon, 06 May 2024 09:54:19 +0200, Jaroslav Kysela wrote: > > dump_config_tree() is declared to return an int, but the compiler cannot > prove that it always returns any value at all. This leads to a clang > warning, when building via: > > make LLVM=1 -C tools/testing/selftests > > Suggested-by: John Hubbard <jhubbard@nvidia.com> > Cc: Mark Brown <broonie@kernel.org> > Signed-off-by: Jaroslav Kysela <perex@perex.cz> Applied now. Thanks. Takashi
On 5/6/24 12:54 AM, Jaroslav Kysela wrote: > dump_config_tree() is declared to return an int, but the compiler cannot > prove that it always returns any value at all. This leads to a clang > warning, when building via: > > make LLVM=1 -C tools/testing/selftests > > Suggested-by: John Hubbard <jhubbard@nvidia.com> > Cc: Mark Brown <broonie@kernel.org> > Signed-off-by: Jaroslav Kysela <perex@perex.cz> > --- > tools/testing/selftests/alsa/conf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/alsa/conf.c b/tools/testing/selftests/alsa/conf.c > index 89e3656a042d..e2b3a5810f47 100644 > --- a/tools/testing/selftests/alsa/conf.c > +++ b/tools/testing/selftests/alsa/conf.c > @@ -105,7 +105,7 @@ static struct card_cfg_data *conf_data_by_card(int card, bool msg) > return NULL; > } > > -static int dump_config_tree(snd_config_t *top) > +static void dump_config_tree(snd_config_t *top) OK, looks good. :) > { > snd_output_t *out; > int err; thanks,
diff --git a/tools/testing/selftests/alsa/conf.c b/tools/testing/selftests/alsa/conf.c index 89e3656a042d..e2b3a5810f47 100644 --- a/tools/testing/selftests/alsa/conf.c +++ b/tools/testing/selftests/alsa/conf.c @@ -105,7 +105,7 @@ static struct card_cfg_data *conf_data_by_card(int card, bool msg) return NULL; } -static int dump_config_tree(snd_config_t *top) +static void dump_config_tree(snd_config_t *top) { snd_output_t *out; int err;
dump_config_tree() is declared to return an int, but the compiler cannot prove that it always returns any value at all. This leads to a clang warning, when building via: make LLVM=1 -C tools/testing/selftests Suggested-by: John Hubbard <jhubbard@nvidia.com> Cc: Mark Brown <broonie@kernel.org> Signed-off-by: Jaroslav Kysela <perex@perex.cz> --- tools/testing/selftests/alsa/conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)