]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
wma: Fix sparse error.
authorAndre Noll <maan@systemlinux.org>
Sat, 4 May 2013 18:39:54 +0000 (20:39 +0200)
committerAndre Noll <maan@systemlinux.org>
Sat, 4 May 2013 18:39:54 +0000 (20:39 +0200)
wma_common.c defines wma_log2() with __attribute__ ((const)), but the
declaration in wma.h lacks this attribute. Sparse does not like that
and fails with

wma_common.c:147:15: error: symbol 'wma_log2' redeclared with different type (originally declared at wma.h:28) - different modifiers

Add the const attribute also to wma.h.

wma.h

diff --git a/wma.h b/wma.h
index 33e34a3515b482c9f682e6c7472dbc7ec711e190..f0ba7f631703b35878606facde8f2980de621bce 100644 (file)
--- a/wma.h
+++ b/wma.h
@@ -25,7 +25,7 @@ struct asf_header_info {
 };
 
 /* wma_common.c */
-int wma_log2(unsigned int v);
+__a_const int wma_log2(unsigned int v);
 const char *search_pattern(const char *pattern, int pattern_len,
                const char *buf, int buf_size);
 int read_asf_header(const char *buf, int loaded, struct asf_header_info *ahi);