Re: [PHP-GTK-DEV] #46999 [Opn]: -Werror=format-security

[email protected] (Bob Majdak Jr)
Newsgroups php.gtk.dev
Message-ID <[email protected]>
valid. i'd suggest committing.

-bob

On 01/04/2009 07:13 AM, oden dot eriksson at envitory dot se wrote:
>   ID:               46999
>   User updated by:  oden dot eriksson at envitory dot se
>   Reported By:      oden dot eriksson at envitory dot se
>   Status:           Open
>   Bug Type:         PHP-GTK related
>   Operating System: Linux
>   PHP Version:      5.2.8
>   New Comment:
>
> --- main/php_gtk_util.c 2008-03-12 16:46:45.000000000 +0100
> +++ main/php_gtk_util.c.oden    2009-01-04 13:03:11.000000000 +0100
> @@ -419,7 +419,7 @@ static int parse_arg(int arg_num, zval *
>                                          get_active_class_name(NULL
> TSRMLS_CC),
>
> get_active_function_name(TSRMLS_C), arg_num, expected_type,
>                                          php_gtk_zval_type_name(*arg));
> -                       php_error(E_WARNING, buf);
> +                       php_error(E_WARNING, "%s", buf);
>                  }
>                  return 0;
>          }
> @@ -479,7 +479,7 @@ static int parse_va_args(int argc, zval
>                                          argc<  min_argc ? min_argc :
> max_argc,
>                                          (argc<  min_argc ? min_argc :
> max_argc) == 1 ? "" : "s",
>                                          argc);
> -                       php_error(E_WARNING, buf);
> +                       php_error(E_WARNING, "%s", buf);
>                  }
>                  return 0;
>          }
>
>
> Previous Comments:
> ------------------------------------------------------------------------
>
> [2009-01-04 12:12:42] oden dot eriksson at envitory dot se
>
> Description:
> ------------
> The build fails with -Werror=format-security
>
> Will attach a patch that fixes this.
>
> Expected result:
> ----------------
> It should build.
>
> Actual result:
> --------------
> /home/oden/RPM/BUILD/php-gtk-2.0.1/main/php_gtk_util.c: In function
> 'parse_arg':
> /home/oden/RPM/BUILD/php-gtk-2.0.1/main/php_gtk_util.c:422: error:
> format not a string literal and no format arguments
> /home/oden/RPM/BUILD/php-gtk-2.0.1/main/php_gtk_util.c: In function
> 'parse_va_args':
> /home/oden/RPM/BUILD/php-gtk-2.0.1/main/php_gtk_util.c:482: error:
> format not a string literal and no format arguments
>
>
>
> ------------------------------------------------------------------------
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.