]> git.alsa-project.org Git - tinycompress.git/commitdiff
tinycompress: cplay: make functions static
authorVinod Koul <vinod.koul@intel.com>
Sat, 9 Jan 2016 08:12:46 +0000 (13:42 +0530)
committerVinod Koul <vinod.koul@intel.com>
Sat, 9 Jan 2016 08:25:29 +0000 (13:55 +0530)
Sparse rightly complains some functions should be static so make them static

cplay.c:100:5: warning: symbol 'parse_mp3_header' was not declared. Should it be static?
cplay.c:129:5: warning: symbol 'check_codec_format_supported' was not declared. Should it be static?
../../include/tinycompress/tinymp3.h:66:11: warning: symbol 'mp3_sample_rates' was not declared. Should it be static?
../../include/tinycompress/tinymp3.h:72:11: warning: symbol 'mp3_bit_rates' was not declared. Should it be static?

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
include/tinycompress/tinymp3.h
src/utils/cplay.c

index b7b45e3a61097aa5a88a9d90cb4b0e9f7af6ac4e..a709c397ee09ae32c3f03ae280fbca0561d24da7 100644 (file)
@@ -63,13 +63,13 @@ extern "C" {
 
 #define MP3_SYNC 0xe0ff
 
-const int mp3_sample_rates[3][3] = {
+static const int mp3_sample_rates[3][3] = {
        {44100, 48000, 32000},        /* MPEG-1 */
        {22050, 24000, 16000},        /* MPEG-2 */
        {11025, 12000,  8000},        /* MPEG-2.5 */
 };
 
-const int mp3_bit_rates[3][3][15] = {
+static const int mp3_bit_rates[3][3][15] = {
        {
                /* MPEG-1 */
                {  0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448}, /* Layer 1 */
index 2d1a1760b3ec61838322ebdc62d07d2e742111f1..032a9711140276f5c08cab5f6de0952c4245844f 100644 (file)
@@ -97,7 +97,7 @@ struct mp3_header {
        uint8_t format2;
 };
 
-int parse_mp3_header(struct mp3_header *header, unsigned int *num_channels,
+static int parse_mp3_header(struct mp3_header *header, unsigned int *num_channels,
                unsigned int *sample_rate, unsigned int *bit_rate)
 {
        int ver_idx, mp3_version, layer, bit_rate_idx, sample_rate_idx, channel_idx;
@@ -126,7 +126,7 @@ int parse_mp3_header(struct mp3_header *header, unsigned int *num_channels,
        return 0;
 }
 
-int check_codec_format_supported(unsigned int card, unsigned int device, struct snd_codec *codec)
+static int check_codec_format_supported(unsigned int card, unsigned int device, struct snd_codec *codec)
 {
        if (is_codec_supported(card, device, COMPRESS_IN, codec) == false) {
                fprintf(stderr, "Error: This codec or format is not supported by DSP\n");