You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jeff Trawick <tr...@gmail.com> on 2011/05/07 16:32:14 UTC

Re: svn commit: r1100443 - /httpd/httpd/trunk/server/mpm/winnt/service.c

On Sat, May 7, 2011 at 12:15 AM,  <wr...@apache.org> wrote:
> Author: wrowe
> Date: Sat May  7 04:15:01 2011
> New Revision: 1100443
>
> URL: http://svn.apache.org/viewvc?rev=1100443&view=rev
> Log:
> Not possible; you don't declare a variable const and then
> maniuplate it.
>
> Modified:
>    httpd/httpd/trunk/server/mpm/winnt/service.c
>
> Modified: httpd/httpd/trunk/server/mpm/winnt/service.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/winnt/service.c?rev=1100443&r1=1100442&r2=1100443&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/server/mpm/winnt/service.c (original)
> +++ httpd/httpd/trunk/server/mpm/winnt/service.c Sat May  7 04:15:01 2011
> @@ -750,7 +750,7 @@ apr_status_t mpm_service_start(apr_pool_
>                                const char * const * argv)
>  {
>     apr_status_t rv;
> -    const CHAR **start_argv;
> +    CHAR **start_argv;

That const was for what start_argv pointed to indirectly, to prevent
start_argv from being used to mangle it (start_argv[0][0] = '!').

Of course the end goal was to shut up the compiler about what
StartService() wanted as the third arg.  I'll look for a solution that
makes both compilers happy.

Re: svn commit: r1100443 - /httpd/httpd/trunk/server/mpm/winnt/service.c

Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 5/7/2011 9:32 AM, Jeff Trawick wrote:
> 
> Of course the end goal was to shut up the compiler about what
> StartService() wanted as the third arg.  I'll look for a solution that
> makes both compilers happy.

I suspect that only a cast will accomplish this.  But it should not
be necessary, additive constness should not need to be specified
when passing arguments.  Subtracting constness is another matter.