[hipl-commit] Re: [trunk] Rev 4154: Correct conversion specifiers in sscanf invocation. Fixes the warnings:

  • From: Diego Biurrun <diego@xxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Wed, 07 Apr 2010 16:26:15 +0200

On Wed, Apr 07, 2010 at 05:16:29PM +0300, Diego Biurrun wrote:
> 
> Log:
>   Correct conversion specifiers in sscanf invocation.  Fixes the warnings:
>   
>   agent/tools.c:157: error: format `%a' expects type `float *', but argument 
> 3 has type `char **'
>   agent/tools.c:157: error: format `%a' expects type `float *', but argument 
> 5 has type `char **'
> 
> --- agent/tools.c     2010-03-18 21:15:21 +0000
> +++ agent/tools.c     2010-04-07 14:16:00 +0000
> @@ -154,7 +154,7 @@
>          }
>  
>          /* Find first '=' or '+' character and split string from there. */
> -        err = sscanf(buf, "%a[^+=]%c%a[^\n]", &p1, &add, &p2);
> +        err = sscanf(buf, "%c[^+=]%c%c[^\n]", p1, &add, p2);
>          if (err != 3) {
>              goto loop_end;

Somebody please doublecheck that this is still working, I'm not sure how
exactly to test this.

Diego

Other related posts: