This patch resolves compiler warnings on forte for httpd-2.0.
I'm posting here in case anyone has any better ideas how to resolve
these warnings before I commit. -- justin
Quick explanations on each file:
modules/filters/config.m4 - autoconf also does "return 0;" leading to
unreachable code since we do a return in
our snippet.
modules/filters/mod_include.c - the while loops are never run more
than once - change to if's.
modules/ssl/mod_ssl.c - Inproper type usage
modules/ssl/ssl_expr_parse.y - YYERROR causes an abort/return.
modules/ssl/ssl_util_ssl.c - Type mismatch
Index: modules/filters/config.m4
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/filters/config.m4,v
retrieving revision 1.7
diff -u -r1.7 config.m4
--- modules/filters/config.m4 6 May 2002 22:23:52 -0000 1.7
+++ modules/filters/config.m4 13 Sep 2002 07:46:50 -0000
@@ -49,7 +49,7 @@
fi
APR_ADDTO(LIBS, [-lz])
AC_MSG_CHECKING([for zlib library])
- AC_TRY_LINK([#include <zlib.h>], [return Z_OK;],
+ AC_TRY_LINK([#include <zlib.h>], [int i = Z_OK;],
[AC_MSG_RESULT(found)
AC_CHECK_HEADERS(zutil.h)],
[AC_MSG_RESULT(not found)
Index: modules/filters/mod_include.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/filters/mod_include.c,v
retrieving revision 1.231
diff -u -r1.231 mod_include.c
--- modules/filters/mod_include.c 10 Jul 2002 06:01:10 -0000 1.231
+++ modules/filters/mod_include.c 13 Sep 2002 07:46:50 -0000
@@ -2086,7 +2086,7 @@
break;
}
/* Percolate upwards */
- while (current != (struct parse_node *) NULL) {
+ if (current != (struct parse_node *) NULL) {
switch (current->token.type) {
case token_not:
case token_eq:
@@ -2106,7 +2106,6 @@
*was_error = 1;
return retval;
}
- break;
}
if (current == (struct parse_node *) NULL) {
new->left = root;
@@ -2215,7 +2214,7 @@
break;
}
/* Percolate upwards */
- while (current != (struct parse_node *) NULL) {
+ if (current != (struct parse_node *) NULL) {
switch (current->token.type) {
case token_not:
case token_eq:
@@ -2238,7 +2237,6 @@
*was_error = 1;
return retval;
}
- break;
}
if (current == (struct parse_node *) NULL) {
new->left = root;
Index: modules/ssl/mod_ssl.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/ssl/mod_ssl.c,v
retrieving revision 1.69
diff -u -r1.69 mod_ssl.c
--- modules/ssl/mod_ssl.c 4 Jun 2002 07:12:26 -0000 1.69
+++ modules/ssl/mod_ssl.c 13 Sep 2002 07:46:50 -0000
@@ -335,7 +335,8 @@
return DECLINED; /* XXX */
}
- vhost_md5 = ap_md5_binary(c->pool, sc->vhost_id, sc->vhost_id_len);
+ vhost_md5 = ap_md5_binary(c->pool, (unsigned char *)sc->vhost_id,
+ sc->vhost_id_len);
if (!SSL_set_session_id_context(ssl, (unsigned char *)vhost_md5,
MD5_DIGESTSIZE*2))
Index: modules/ssl/ssl_expr_parse.y
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/ssl/ssl_expr_parse.y,v
retrieving revision 1.5
diff -u -r1.5 ssl_expr_parse.y
--- modules/ssl/ssl_expr_parse.y 13 Mar 2002 20:47:55 -0000 1.5
+++ modules/ssl/ssl_expr_parse.y 13 Sep 2002 07:46:50 -0000
@@ -151,7 +151,6 @@
REG_EXTENDED|REG_NOSUB)) == NULL) {
ssl_expr_error = "Failed to compile regular expression";
YYERROR;
- regex = NULL;
}
$$ = ssl_expr_make(op_Regex, regex, NULL);
}
@@ -161,7 +160,6 @@
REG_EXTENDED|REG_NOSUB|REG_ICASE)) == NULL) {
ssl_expr_error = "Failed to compile regular expression";
YYERROR;
- regex = NULL;
}
$$ = ssl_expr_make(op_Regex, regex, NULL);
}
Index: modules/ssl/ssl_util_ssl.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/ssl/ssl_util_ssl.c,v
retrieving revision 1.20
diff -u -r1.20 ssl_util_ssl.c
--- modules/ssl/ssl_util_ssl.c 2 Apr 2002 22:07:09 -0000 1.20
+++ modules/ssl/ssl_util_ssl.c 13 Sep 2002 07:46:50 -0000
@@ -386,7 +386,7 @@
X509_NAME *xsn;
X509_NAME_ENTRY *xsne;
int i, nid;
- char *data_ptr;
+ unsigned char *data_ptr;
int data_len;
xsn = X509_get_subject_name(xs);