[alsa-devel] [PATCH 1/2] pcm_rate_linear: Annotate unused function parameter to avoid compiler warnings.
From: Stefan Schmidt stefan@slimlogic.co.uk
Signed-off-by: Stefan Schmidt stefan@slimlogic.co.uk --- src/pcm/pcm_rate_linear.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/pcm/pcm_rate_linear.c b/src/pcm/pcm_rate_linear.c index 8b2d2d0..7481b38 100644 --- a/src/pcm/pcm_rate_linear.c +++ b/src/pcm/pcm_rate_linear.c @@ -405,15 +405,15 @@ static void linear_close(void *obj) free(obj); }
-static int get_supported_rates(void *rate, unsigned int *rate_min, - unsigned int *rate_max) +static int get_supported_rates(ATTRIBUTE_UNUSED void *rate, + unsigned int *rate_min, unsigned int *rate_max) { *rate_min = SND_PCM_PLUGIN_RATE_MIN; *rate_max = SND_PCM_PLUGIN_RATE_MAX; return 0; }
-static void linear_dump(void *rate, snd_output_t *out) +static void linear_dump(ATTRIBUTE_UNUSED void *rate, snd_output_t *out) { snd_output_printf(out, "Converter: linear-interpolation\n"); } @@ -432,7 +432,8 @@ static const snd_pcm_rate_ops_t linear_ops = { .dump = linear_dump, };
-int SND_PCM_RATE_PLUGIN_ENTRY(linear) (unsigned int version, void **objp, snd_pcm_rate_ops_t *ops) +int SND_PCM_RATE_PLUGIN_ENTRY(linear) (ATTRIBUTE_UNUSED unsigned int version, + void **objp, snd_pcm_rate_ops_t *ops) { struct rate_linear *rate;
From: Stefan Schmidt stefan@slimlogic.co.uk
The function should be useful later so keep it in place and just comment it out until it is actually used.
Signed-off-by: Stefan Schmidt stefan@slimlogic.co.uk --- src/alisp/alisp.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/alisp/alisp.c b/src/alisp/alisp.c index 4ad1d09..f3580f9 100644 --- a/src/alisp/alisp.c +++ b/src/alisp/alisp.c @@ -233,6 +233,9 @@ static struct alisp_object * incref_tree(struct alisp_instance *instance, struct return incref_object(instance, p); }
+/* Function not used yet. Leave it commented out until we actually use it to + * avoid compiler complaints */ +#if 0 static struct alisp_object * incref_tree_explicit(struct alisp_instance *instance, struct alisp_object * p, struct alisp_object * e) { if (p == NULL) @@ -250,6 +253,7 @@ static struct alisp_object * incref_tree_explicit(struct alisp_instance *instanc return incref_object(instance, p); return p; } +#endif
static void free_objects(struct alisp_instance *instance) {
participants (1)
-
Stefan Schmidt