From: Mengdong Lin <mengdong.lin@linux.intel.com>
To: Takashi Sakamoto <o-takashi@sakamocchi.jp>,
tiwai@suse.de, perex@perex.cz
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH][alsa-lib] topology: fix sign-compare warning introduced to set_link_hw_config() and tplg_add_link_object()
Date: Tue, 27 Dec 2016 18:39:17 +0800 [thread overview]
Message-ID: <586244D5.5010306@linux.intel.com> (raw)
In-Reply-To: <378f4729-f0a2-c912-e2b4-39609fa2740f@sakamocchi.jp>
On 12/17/2016 08:40 AM, Takashi Sakamoto wrote:
> Ping to Mengdong Lin. I wish this patch would be included to next
> release of this library.
Sorry for the late reply and thanks for the fix. The patches looks good
to me.
Thanks
Mengdong
>
> On 2016年11月30日 00:41, Takashi Sakamoto wrote:
>> Some functions recently introduced to this library include comparison
>> between variables with different types, then compiler generates
>> below warnings.
>>
>> pcm.c: In function ‘set_link_hw_config’:
>> pcm.c:1179:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
>> for (i = 0; i < cfg->tx_channels; i++)
>> ^
>> pcm.c:1183:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
>> for (i = 0; i < cfg->rx_channels; i++)
>> ^
>> pcm.c: In function ‘tplg_add_link_object’:
>> pcm.c:1223:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
>> for (i = 0; i < link->num_streams; i++)
>> ^
>> pcm.c:1231:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
>> for (i = 0; i < link->num_hw_configs; i++)
>>
>> This commit suppresses them.
>>
>> Fixes: 6b4d775b9752 ("topology: Parse HW configurations of physical DAI links defined by C API")
>> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
>> ---
>> src/topology/pcm.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/topology/pcm.c b/src/topology/pcm.c
>> index 8f8a703..1de8655 100644
>> --- a/src/topology/pcm.c
>> +++ b/src/topology/pcm.c
>> @@ -1147,7 +1147,7 @@ int tplg_add_pcm_object(snd_tplg_t *tplg, snd_tplg_obj_template_t *t)
>> static int set_link_hw_config(struct snd_soc_tplg_hw_config *cfg,
>> struct snd_tplg_hw_config_template *tpl)
>> {
>> - int i;
>> + unsigned int i;
>>
>> cfg->size = sizeof(*cfg);
>> cfg->id = tpl->id;
>> @@ -1190,7 +1190,7 @@ int tplg_add_link_object(snd_tplg_t *tplg, snd_tplg_obj_template_t *t)
>> struct snd_tplg_link_template *link_tpl = t->link;
>> struct snd_soc_tplg_link_config *link, *_link;
>> struct tplg_elem *elem;
>> - int i;
>> + unsigned int i;
>>
>> if (t->type != SND_TPLG_TYPE_LINK && t->type != SND_TPLG_TYPE_BE
>> && t->type != SND_TPLG_TYPE_CC)
>>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2016-12-27 10:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-29 15:41 [PATCH][alsa-lib] topology: fix sign-compare warning introduced to set_link_hw_config() and tplg_add_link_object() Takashi Sakamoto
2016-12-17 0:40 ` Takashi Sakamoto
2016-12-27 10:39 ` Mengdong Lin [this message]
2017-01-02 14:20 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=586244D5.5010306@linux.intel.com \
--to=mengdong.lin@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=o-takashi@sakamocchi.jp \
--cc=perex@perex.cz \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.