You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by Joachim Zobel <jz...@heute-morgen.de> on 2009/09/18 18:21:04 UTC

Obscure warning compiling a module on amd64 with gcc

Hi.

I get the following warning compiling my module on linux/amd64 for
Apache/2.2.9 with apxs:

..
  int test =  ap_get_request_note(r, AP_NOTE_DELAY) ;
  void **pp_delay =  ap_get_request_note(r, AP_NOTE_DELAY) ;
..

mod_delay.c:66: warning: initialization makes pointer from integer
without a cast

This complains about the second line although the apache headers say the
function returns a void **:

/usr/include/apache2/http_core.h:AP_DECLARE(void **)
ap_get_request_note(request_rec *r, apr_size_t note_num);

Any ideas what is happening there?

Sincerely,
Joachim



Re: Obscure warning compiling a module on amd64 with gcc

Posted by Joachim Zobel <jz...@heute-morgen.de>.
Adding the declaration 

AP_DECLARE(void **) ap_get_request_note(request_rec *r, apr_size_t note_num);

from the http_core.h after the headers are included silences the
warning. Weird.

Sincerely,
Joachim