rse 99/08/08 23:15:27
Modified: src/modules/experimental mod_auth_digest.c
Log:
Fix the following warnings (occured under FreeBSD 3.1, GCC 2.95):
| egcc -c -I../../os/unix -I../../include -funsigned-char
-DTARGET=\"apache\"
| -DDEV_RANDOM=/dev/random -DUSE_EXPAT -I../../lib/expat-lite -pipe -O2
| -pedantic -Wall -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes
| -Wmissing-declarations -Wnested-externs -Winline `../../apaci`
| mod_auth_digest.c
| mod_auth_digest.c:1095: warning: declaration of `time' shadows global
| declaration
| mod_auth_digest.c: In function `gen_nonce_hash':
| mod_auth_digest.c:1098: warning: declaration of `time' shadows global
| declaration
| mod_auth_digest.c: In function `authenticate_digest_user':
| mod_auth_digest.c:1605: warning: `main' is usually a function
Revision Changes Path
1.2 +7 -7 apache-1.3/src/modules/experimental/mod_auth_digest.c
Index: mod_auth_digest.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/modules/experimental/mod_auth_digest.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- mod_auth_digest.c 1999/08/08 22:34:24 1.1
+++ mod_auth_digest.c 1999/08/09 06:15:26 1.2
@@ -1092,7 +1092,7 @@
/* The hash part of the nonce is a SHA-1 hash of the time, realm, opaque,
* and our secret.
*/
-static void gen_nonce_hash(char *hash, const char *time, const char *opaque,
+static void gen_nonce_hash(char *hash, const char *timestr, const char
*opaque,
const server_rec *server,
const digest_config_rec *conf)
{
@@ -1106,7 +1106,7 @@
strlen(server->server_hostname));
ap_SHA1Update_binary(&ctx, (const unsigned char *) &server->port,
sizeof(server->port));
- ap_SHA1Update_binary(&ctx, (const unsigned char *) time, strlen(time));
+ ap_SHA1Update_binary(&ctx, (const unsigned char *) timestr,
strlen(timestr));
if (opaque)
ap_SHA1Update_binary(&ctx, (const unsigned char *) opaque,
strlen(opaque));
@@ -1602,7 +1602,7 @@
{
digest_config_rec *conf;
digest_header_rec *resp;
- request_rec *main;
+ request_rec *mainreq;
conn_rec *conn = r->connection;
const char *t;
int res;
@@ -1622,10 +1622,10 @@
/* get the client response and mark */
- main = r;
- while (main->main != NULL) main = main->main;
- while (main->prev != NULL) main = main->prev;
- resp = (digest_header_rec *) ap_get_module_config(main->request_config,
+ mainreq = r;
+ while (mainreq->main != NULL) mainreq = mainreq->main;
+ while (mainreq->prev != NULL) mainreq = mainreq->prev;
+ resp = (digest_header_rec *)
ap_get_module_config(mainreq->request_config,
&digest_module);
resp->needed_auth = 1;