httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject Re: cvs commit: apache-2.0/src/lib/apr/misc/unix getopt.c
Date Wed, 09 Aug 2000 16:43:58 GMT
wrowe@locus.apache.org writes:

> wrowe       00/08/09 07:54:04
> 
>   Modified:    src/lib/apr/include apr_getopt.h
>                src/lib/apr/misc/unix getopt.c
...
>   + * @deffunc apr_status_t apr_getopt(apr_getopt_t *os, const char *opts, char *optch,
char **optarg)

This doc doesn't match the current signature of apr_getopt() (but see
note below)...

>     */
>   -APR_EXPORT(apr_status_t) apr_getopt(apr_int32_t nargc, char *const *nargv, 
>   -                                  const char *ostr, apr_int32_t *rv, 
>   -                                  apr_pool_t *cont);
>   +APR_EXPORT(apr_status_t) apr_getopt(apr_getopt_t *os, const char *opts, 
>   +                                    char *optch, char const** optarg);
>    
>    #endif  /* ! APR_GETOPT_H */

About the signatures of apr_getopt() and apr_initopt()...  Are the
types of the last parameter to each function convenient to the caller?
We now get these warnings with gcc (-Wall -Wstrict-prototypes and whatever
else maintainer mode brings):

2a3,4
> http_main.c: In function `main':
> http_main.c:321: warning: passing arg 4 of `apr_initopt' from incompatible pointer type
4a7,9
> ab.c: In function `main':
> ab.c:1010: warning: passing arg 4 of `apr_initopt' from incompatible pointer type
> ab.c:1011: warning: passing arg 4 of `apr_getopt' from incompatible pointer type

I could play around with argv and optarg in http_main.c and ab.c, but
that seems to be missing the point since argv and optarg are already
declared in the obvious way.

Have fun,

-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...

Mime
View raw message