You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Joe Orton <jo...@redhat.com> on 2005/09/21 16:03:11 UTC
Re: svn commit: r290672 - in /httpd/httpd/trunk/modules: database/ database/Makefile.in database/config.m4 database/mod_dbd.c database/mod_dbd.h experimental/mod_dbd.c experimental/mod_dbd.h
On Wed, Sep 21, 2005 at 10:04:05AM -0000, niq@apache.org wrote:
> Author: niq
> Date: Wed Sep 21 03:04:00 2005
> New Revision: 290672
>
> URL: http://svn.apache.org/viewcvs?rev=290672&view=rev
> Log:
> Move mod_dbd from /experimental/ to /database/
That broke the build, the duplicated APACHE_MODULE meant it was trying
to build mod_dbd in both old and new locations; here are the new gcc
warnings since this gets enabled by default now:
mod_dbd.c: In function 'ap_dbd_open':
mod_dbd.c:301: warning: dereferencing type-punned pointer will break strict-aliasing rules
mod_dbd.c:310: warning: dereferencing type-punned pointer will break strict-aliasing rules
mod_dbd.c:316: warning: 'rv' is used uninitialized in this function
ap_dbd_t *rec = NULL;
...
rv = dbd_construct((void**)&rec, svr, pool);
should be e.g.:
ap_dbd_t *rec;
void *vrec = NULL;
dbd_construct(&vrec, ...);
rec = vrec;
This really needs a configure-time apr-util version check too since it's
quite possible to build against apr-util 1.0 otherwise.
Regards,
joe
Re: svn commit: r290672 - in /httpd/httpd/trunk/modules: database/ database/Makefile.in database/config.m4 database/mod_dbd.c database/mod_dbd.h experimental/mod_dbd.c experimental/mod_dbd.h
Posted by Joe Orton <jo...@redhat.com>.
On Thu, Sep 22, 2005 at 11:48:12AM +0100, Nick Kew wrote:
> On Thursday 22 September 2005 11:13, Joe Orton wrote:
>
> > > Any suggestions that don't add bloat?
> >
> > Using ap_set_*_slot would reduce bloat and remove the need for this
> > slightly weird config handling stuff entirely AFAICT.
>
> I wasn't aware ap_set_*_slot could apply to the *server* config. Do tell!
> This slightly weird config handling is a workaround for exactly that.
Duh, good point ;) I guess just use a cast to long then, that will fix
the warning.
Regards,
joe
Re: svn commit: r290672 - in /httpd/httpd/trunk/modules: database/ database/Makefile.in database/config.m4 database/mod_dbd.c database/mod_dbd.h experimental/mod_dbd.c experimental/mod_dbd.h
Posted by Nick Kew <ni...@webthing.com>.
On Thursday 22 September 2005 11:13, Joe Orton wrote:
> > Any suggestions that don't add bloat?
>
> Using ap_set_*_slot would reduce bloat and remove the need for this
> slightly weird config handling stuff entirely AFAICT.
I wasn't aware ap_set_*_slot could apply to the *server* config. Do tell!
This slightly weird config handling is a workaround for exactly that.
--
Nick Kew
Re: svn commit: r290672 - in /httpd/httpd/trunk/modules: database/ database/Makefile.in database/config.m4 database/mod_dbd.c database/mod_dbd.h experimental/mod_dbd.c experimental/mod_dbd.h
Posted by Joe Orton <jo...@redhat.com>.
On Thu, Sep 22, 2005 at 10:39:04AM +0100, Nick Kew wrote:
> On Thursday 22 September 2005 09:43, Joe Orton wrote:
>
> > And another for x86_64:
> >
> > cc1: warnings being treated as errors
> > mod_dbd.c: In function `dbd_param':
> > mod_dbd.c:74: warning: cast from pointer to integer of different size
>
...
> Any suggestions that don't add bloat?
Using ap_set_*_slot would reduce bloat and remove the need for this
slightly weird config handling stuff entirely AFAICT.
Regards,
joe
Re: svn commit: r290672 - in /httpd/httpd/trunk/modules: database/ database/Makefile.in database/config.m4 database/mod_dbd.c database/mod_dbd.h experimental/mod_dbd.c experimental/mod_dbd.h
Posted by Nick Kew <ni...@webthing.com>.
On Thursday 22 September 2005 09:43, Joe Orton wrote:
> And another for x86_64:
>
> cc1: warnings being treated as errors
> mod_dbd.c: In function `dbd_param':
> mod_dbd.c:74: warning: cast from pointer to integer of different size
Hmmm.
Bearing in mind where those values come from, is there a risk of trouble?
It's basically casting an enum to void in:
AP_INIT_TAKE1("DBDriver", dbd_param, (void*)cmd_name, RSRC_CONF,
"SQL Driver"),
and casting back in
switch ((int)cmd->info) { /* this is line 74 */
case cmd_name:
...
}
I'd expect that to have size and byte-order issues over RPC, but not in
a single architecture. Unless you know otherwise?
Any suggestions that don't add bloat?
--
Nick Kew
Re: svn commit: r290672 - in /httpd/httpd/trunk/modules: database/ database/Makefile.in database/config.m4 database/mod_dbd.c database/mod_dbd.h experimental/mod_dbd.c experimental/mod_dbd.h
Posted by Joe Orton <jo...@redhat.com>.
On Wed, Sep 21, 2005 at 03:03:11PM +0100, Joe Orton wrote:
> On Wed, Sep 21, 2005 at 10:04:05AM -0000, niq@apache.org wrote:
> > Author: niq
> > Date: Wed Sep 21 03:04:00 2005
> > New Revision: 290672
> >
> > URL: http://svn.apache.org/viewcvs?rev=290672&view=rev
> > Log:
> > Move mod_dbd from /experimental/ to /database/
>
> That broke the build, the duplicated APACHE_MODULE meant it was trying
> to build mod_dbd in both old and new locations; here are the new gcc
> warnings since this gets enabled by default now:
And another for x86_64:
cc1: warnings being treated as errors
mod_dbd.c: In function `dbd_param':
mod_dbd.c:74: warning: cast from pointer to integer of different size