[alsa-devel] [sound:for-linus 4/4] sound/oss/pas2_card.c:338:5: warning: too many arguments for format

Takashi Iwai tiwai at suse.de
Fri Jan 4 10:42:40 CET 2013


At Fri, 4 Jan 2013 03:40:47 -0600,
Asim Kadav wrote:
> 
> I'm sorry. There was a stray comma. I fixed it. 
> 
> Signed-off-by: Asim Kadav <kadav at cs.wisc.edu>

I already fixed it now by myself.


thanks,

Takashi

> ---
> sound/oss/pas2_card.c | 5 +++++
> 1 file changed, 5 insertions(+)
> 
> diff --git a/sound/oss/pas2_card.c b/sound/oss/pas2_card.c
> index dabf8a8..f35e752 100644
> --- a/sound/oss/pas2_card.c
> +++ b/sound/oss/pas2_card.c
> @@ -333,6 +333,11 @@ static void __init attach_pas_card(struct address_info *hw_config)
>                {
>                        char            temp[100];
> 
> +                       if (pas_model < 0 ||
> +                               pas_model >= ARRAY_SIZE(pas_model_names)) {
> +                               printk(KERN_ERR "pas2 unrecognized model.\n");
> +                               return;
> +                       }
>                        sprintf(temp,
>                            "%s rev %d", pas_model_names[(int) pas_model],
>                                    pas_read(0x2789));
> --
> 1.7.11.3
> On Jan 4, 2013, at 3:32 AM, kbuild test robot <fengguang.wu at intel.com> wrote:
> 
> > tree:   git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-linus
> > head:   b56458b36c8922d1d57c2320151194059dfb9a31
> > commit: b56458b36c8922d1d57c2320151194059dfb9a31 [4/4] sound: oss/pas2: Fix possible access out of array
> > config: make ARCH=x86_64 allyesconfig
> > 
> > All warnings:
> > 
> > sound/oss/pas2_card.c: In function 'attach_pas_card':
> > sound/oss/pas2_card.c:338:5: warning: too many arguments for format [-Wformat-extra-args]
> > 
> > vim +338 sound/oss/pas2_card.c
> > 
> > ^1da177e Linus Torvalds 2005-04-16  322  	return pas_model;
> > ^1da177e Linus Torvalds 2005-04-16  323  }
> > ^1da177e Linus Torvalds 2005-04-16  324  
> > ^1da177e Linus Torvalds 2005-04-16  325  static void __init attach_pas_card(struct address_info *hw_config)
> > ^1da177e Linus Torvalds 2005-04-16  326  {
> > ^1da177e Linus Torvalds 2005-04-16  327  	pas_irq = hw_config->irq;
> > ^1da177e Linus Torvalds 2005-04-16  328  
> > ^1da177e Linus Torvalds 2005-04-16  329  	if (detect_pas_hw(hw_config))
> > ^1da177e Linus Torvalds 2005-04-16  330  	{
> > ^1da177e Linus Torvalds 2005-04-16  331  
> > ^1da177e Linus Torvalds 2005-04-16  332  		if ((pas_model = pas_read(0xFF88)))
> > ^1da177e Linus Torvalds 2005-04-16  333  		{
> > ^1da177e Linus Torvalds 2005-04-16  334  			char            temp[100];
> > ^1da177e Linus Torvalds 2005-04-16  335  
> > b56458b3 Asim Kadav     2013-01-03  336  			if (pas_model < 0 ||
> > b56458b3 Asim Kadav     2013-01-03  337  			    pas_model >= ARRAY_SIZE(pas_model_names)) {
> > b56458b3 Asim Kadav     2013-01-03 @338  				printk(KERN_ERR, "pas2 unrecognized model.\n");
> > b56458b3 Asim Kadav     2013-01-03  339  				return;
> > b56458b3 Asim Kadav     2013-01-03  340  			}
> > ^1da177e Linus Torvalds 2005-04-16  341  			sprintf(temp,
> > ^1da177e Linus Torvalds 2005-04-16  342  			    "%s rev %d", pas_model_names[(int) pas_model],
> > ^1da177e Linus Torvalds 2005-04-16  343  				    pas_read(0x2789));
> > ^1da177e Linus Torvalds 2005-04-16  344  			conf_printf(temp, hw_config);
> > ^1da177e Linus Torvalds 2005-04-16  345  		}
> > ^1da177e Linus Torvalds 2005-04-16  346  		if (config_pas_hw(hw_config))
> > 
> > ---
> > 0-DAY kernel build testing backend         Open Source Technology Center
> > Fengguang Wu, Yuanhan Liu                              Intel Corporation
> 
> [2  <text/html; us-ascii (quoted-printable)>]
> 


More information about the Alsa-devel mailing list