You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by William A Rowe Jr <wr...@rowe-clan.net> on 2015/08/19 16:37:16 UTC

Re: svn commit: r1696592 - in /httpd/httpd/trunk/modules/http2: h2_alt_svc.c h2_conn.c h2_from_h1.c h2_request.c h2_switch.c

On Wed, Aug 19, 2015 at 9:13 AM, <ic...@apache.org> wrote:

> Author: icing
> Date: Wed Aug 19 14:13:49 2015
> New Revision: 1696592
>
> URL: http://svn.apache.org/r1696592
> Log:
> mod_h2 compiles warning free in maintainer-mode
>
> --- httpd/httpd/trunk/modules/http2/h2_alt_svc.c (original)
> +++ httpd/httpd/trunk/modules/http2/h2_alt_svc.c Wed Aug 19 14:13:49 2015
> @@ -42,13 +42,13 @@ void h2_alt_svc_register_hooks(void)
>   * - do not use quotation marks
>   */
>  h2_alt_svc *h2_alt_svc_parse(const char *s, apr_pool_t *pool) {
> -    const char *sep = strchr(s, '=');
> +    const char *sep = strchr((char *)s, '=');
>


We solve these issues with ap_strchr_c, ap_strrchr_c, ap_strstr_c etc.
This avoids the casts, which are always worth avoiding for other analysis
tools and inadvertent overwriting.

Re: svn commit: r1696592 - in /httpd/httpd/trunk/modules/http2: h2_alt_svc.c h2_conn.c h2_from_h1.c h2_request.c h2_switch.c

Posted by Stefan Eissing <st...@greenbytes.de>.
> Am 19.08.2015 um 16:37 schrieb William A Rowe Jr <wr...@rowe-clan.net>:
>  h2_alt_svc *h2_alt_svc_parse(const char *s, apr_pool_t *pool) {
> -    const char *sep = strchr(s, '=');
> +    const char *sep = strchr((char *)s, '=');
> 
> 
> We solve these issues with ap_strchr_c, ap_strrchr_c, ap_strstr_c etc.  This avoids the casts, which are always worth avoiding for other analysis tools and inadvertent overwriting.

I live to learn. Changed in r1696607.

<green/>bytes GmbH
Hafenweg 16, 48155 Münster, Germany
Phone: +49 251 2807760. Amtsgericht Münster: HRB5782