Skip to contentSkip to conversation

pcm_rate_linear: Annotate unused function parameter to avoid compiler warnings.

PATCH New Stefan Schmidt 1 participant 2 messages Sep 30, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 pcm_rate_linear: Annotate unused function parameter to avoid compiler warnings.

From: Stefan Schmidt <[email protected]>

---
 src/pcm/pcm_rate_linear.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
src/pcm/pcm_rate_linear.c +5 -4
index 8b2d2d0..7481b38 100644
@@ -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;
 
Signature · 1 line
1.6.4.3
#1 lore raw

PATCH 2/2 alisp: Comment out an unused function to avoid compiler warnings.

From: Stefan Schmidt <[email protected]>

The function should be useful later so keep it in place and just comment it out until it is actually used.

---
 src/alisp/alisp.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
src/alisp/alisp.c +4 -0
index 4ad1d09..f3580f9 100644
@@ -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)
 {
Signature · 1 line
1.6.4.3