mirror of
https://github.com/apache/httpd.git
synced 2025-08-07 04:02:58 +03:00
- Remove a load of unused variables (or variables that are set but never read).
- Move some declarations into the correct #ifdef scope. I couldn't compile/test netware, but the changes look obvious enough. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@982016 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -119,13 +119,10 @@ static char *to_charset = NULL; /* UTF-8 identifier derived from the c
|
||||
/* Derive a code page ID give a language name or ID */
|
||||
static char* derive_codepage_from_lang (apr_pool_t *p, char *language)
|
||||
{
|
||||
int lang_len;
|
||||
char *charset;
|
||||
|
||||
if (!language) /* our default codepage */
|
||||
return apr_pstrdup(p, "ISO-8859-1");
|
||||
else
|
||||
lang_len = strlen(language);
|
||||
|
||||
charset = (char*) apr_hash_get(charset_conversions, language, APR_HASH_KEY_STRING);
|
||||
|
||||
|
@@ -101,7 +101,6 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
|
||||
char *cmd_only, *ptr;
|
||||
const char *new_cmd;
|
||||
netware_dir_config *d;
|
||||
apr_file_t *fh;
|
||||
const char *args = "";
|
||||
|
||||
d = (netware_dir_config *)ap_get_module_config(r->per_dir_config,
|
||||
|
@@ -233,12 +233,10 @@ static int make_secure_socket(apr_pool_t *pconf, const struct sockaddr_in *serve
|
||||
char* key, int mutual, server_rec *sconf)
|
||||
{
|
||||
int s;
|
||||
int one = 1;
|
||||
char addr[MAX_ADDRESS];
|
||||
struct sslserveropts opts;
|
||||
unsigned int optParam;
|
||||
WSAPROTOCOL_INFO SecureProtoInfo;
|
||||
int no = 1;
|
||||
|
||||
if (server->sin_addr.s_addr != htonl(INADDR_ANY))
|
||||
apr_snprintf(addr, sizeof(addr), "address %s port %d",
|
||||
@@ -546,7 +544,6 @@ static const char *set_secure_upgradeable_listener(cmd_parms *cmd, void *dummy,
|
||||
const char *ips, const char* key)
|
||||
{
|
||||
NWSSLSrvConfigRec* sc = get_nwssl_cfg(cmd->server);
|
||||
seclistenup_rec *listen_node;
|
||||
const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
|
||||
char *ports, *addr;
|
||||
unsigned short port;
|
||||
@@ -626,8 +623,6 @@ static int nwssl_pre_config(apr_pool_t *pconf, apr_pool_t *plog,
|
||||
apr_pool_t *ptemp)
|
||||
{
|
||||
seclisten_rec* ap_old_seclisteners;
|
||||
char *ports, *addr;
|
||||
unsigned short port;
|
||||
ap_listen_rec **walk;
|
||||
seclisten_rec **secwalk;
|
||||
apr_sockaddr_t *sa;
|
||||
@@ -724,7 +719,6 @@ static int nwssl_post_config(apr_pool_t *pconf, apr_pool_t *plog,
|
||||
ap_listen_rec *walk;
|
||||
seclisten_rec *secwalk, *lastsecwalk;
|
||||
apr_sockaddr_t *sa;
|
||||
int found_listener = 0;
|
||||
|
||||
/* Walk the old listeners list and compare it to the secure
|
||||
listeners list and remove any secure listener records that
|
||||
@@ -896,8 +890,6 @@ static int isSecureUpgraded (const request_rec *r)
|
||||
|
||||
static int nwssl_hook_Fixup(request_rec *r)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!isSecure(r) && !isSecureUpgraded(r))
|
||||
return DECLINED;
|
||||
|
||||
|
2
modules/cache/mod_cache.c
vendored
2
modules/cache/mod_cache.c
vendored
@@ -885,7 +885,6 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
|
||||
* buckets and use their length to calculate the size
|
||||
*/
|
||||
int all_buckets_here=0;
|
||||
int unresolved_length = 0;
|
||||
size=0;
|
||||
for (e = APR_BRIGADE_FIRST(in);
|
||||
e != APR_BRIGADE_SENTINEL(in);
|
||||
@@ -896,7 +895,6 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
|
||||
break;
|
||||
}
|
||||
if (APR_BUCKET_IS_FLUSH(e)) {
|
||||
unresolved_length = 1;
|
||||
continue;
|
||||
}
|
||||
if (e->length == (apr_size_t)-1) {
|
||||
|
@@ -1984,7 +1984,6 @@ static int dav_method_propfind(request_rec *r)
|
||||
dav_error *err;
|
||||
int result;
|
||||
apr_xml_doc *doc;
|
||||
const apr_xml_elem *child;
|
||||
dav_walker_ctx ctx = { { 0 } };
|
||||
dav_response *multi_status;
|
||||
|
||||
@@ -2035,15 +2034,14 @@ static int dav_method_propfind(request_rec *r)
|
||||
|
||||
/* ### validate that only one of these three elements is present */
|
||||
|
||||
if (doc == NULL
|
||||
|| (child = dav_find_child(doc->root, "allprop")) != NULL) {
|
||||
if (doc == NULL || dav_find_child(doc->root, "allprop") != NULL) {
|
||||
/* note: no request body implies allprop */
|
||||
ctx.propfind_type = DAV_PROPFIND_IS_ALLPROP;
|
||||
}
|
||||
else if ((child = dav_find_child(doc->root, "propname")) != NULL) {
|
||||
else if (dav_find_child(doc->root, "propname") != NULL) {
|
||||
ctx.propfind_type = DAV_PROPFIND_IS_PROPNAME;
|
||||
}
|
||||
else if ((child = dav_find_child(doc->root, "prop")) != NULL) {
|
||||
else if (dav_find_child(doc->root, "prop") != NULL) {
|
||||
ctx.propfind_type = DAV_PROPFIND_IS_PROP;
|
||||
}
|
||||
else {
|
||||
|
@@ -133,16 +133,16 @@ static int filter_init(ap_filter_t *f)
|
||||
static int filter_lookup(ap_filter_t *f, ap_filter_rec_t *filter)
|
||||
{
|
||||
ap_filter_provider_t *provider;
|
||||
const char *str = NULL;
|
||||
char *str1;
|
||||
int match;
|
||||
int err = 0;
|
||||
unsigned int proto_flags;
|
||||
request_rec *r = f->r;
|
||||
harness_ctx *ctx = f->ctx;
|
||||
provider_ctx *pctx;
|
||||
#ifndef NO_PROTOCOL
|
||||
mod_filter_ctx *rctx = ap_get_module_config(r->request_config,
|
||||
&filter_module);
|
||||
#endif
|
||||
|
||||
/* Check registered providers in order */
|
||||
for (provider = filter->providers; provider; provider = provider->next) {
|
||||
@@ -178,9 +178,10 @@ static int filter_lookup(ap_filter_t *f, ap_filter_rec_t *filter)
|
||||
}
|
||||
|
||||
if (proto_flags & AP_FILTER_PROTO_TRANSFORM) {
|
||||
str = apr_table_get(r->headers_out, "Cache-Control");
|
||||
const char *str = apr_table_get(r->headers_out,
|
||||
"Cache-Control");
|
||||
if (str) {
|
||||
str1 = apr_pstrdup(r->pool, str);
|
||||
char *str1 = apr_pstrdup(r->pool, str);
|
||||
ap_str_tolower(str1);
|
||||
if (strstr(str1, "no-transform")) {
|
||||
/* can't use this provider; try next */
|
||||
@@ -235,8 +236,10 @@ static int filter_lookup(ap_filter_t *f, ap_filter_rec_t *filter)
|
||||
static apr_status_t filter_harness(ap_filter_t *f, apr_bucket_brigade *bb)
|
||||
{
|
||||
apr_status_t ret;
|
||||
#ifndef NO_PROTOCOL
|
||||
const char *cachecontrol;
|
||||
char *str;
|
||||
#endif
|
||||
harness_ctx *ctx = f->ctx;
|
||||
ap_filter_rec_t *filter = f->frec;
|
||||
|
||||
|
@@ -3069,10 +3069,6 @@ static apr_status_t includes_filter(ap_filter_t *f, apr_bucket_brigade *b)
|
||||
|
||||
static int include_fixup(request_rec *r)
|
||||
{
|
||||
include_dir_config *conf;
|
||||
|
||||
conf = ap_get_module_config(r->per_dir_config, &include_module);
|
||||
|
||||
if (r->handler && (strcmp(r->handler, "server-parsed") == 0))
|
||||
{
|
||||
if (!r->content_type || !*r->content_type) {
|
||||
@@ -3088,6 +3084,9 @@ static int include_fixup(request_rec *r)
|
||||
}
|
||||
#else
|
||||
{
|
||||
include_dir_config *conf = ap_get_module_config(r->per_dir_config,
|
||||
&include_module);
|
||||
|
||||
if (conf->xbithack == XBITHACK_OFF) {
|
||||
return DECLINED;
|
||||
}
|
||||
|
@@ -142,7 +142,6 @@ char *sed_compile(sed_commands_t *commands, sed_comp_args *compargs,
|
||||
int lc;
|
||||
int i, cflg;
|
||||
int iflag; /* used for non-ascii characters in brackets */
|
||||
int nodelim = 0;
|
||||
char *sp = commands->cp;
|
||||
int regerrno = 0;
|
||||
|
||||
@@ -150,7 +149,6 @@ char *sed_compile(sed_commands_t *commands, sed_comp_args *compargs,
|
||||
if ((c = GETC()) == eof || c == '\n') {
|
||||
if (c == '\n') {
|
||||
UNGETC(c);
|
||||
nodelim = 1;
|
||||
}
|
||||
commands->cp = sp;
|
||||
goto out;
|
||||
|
@@ -517,7 +517,6 @@ static void dump_header_to_log(request_rec *r, unsigned char fheader[],
|
||||
|
||||
while (posn < length) {
|
||||
unsigned char c = fheader[posn];
|
||||
char hexval[3];
|
||||
|
||||
if (i >= 20) {
|
||||
i = 0;
|
||||
|
@@ -59,10 +59,11 @@ APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(proxy, PROXY, int, create_req,
|
||||
/* already called in the knowledge that the characters are hex digits */
|
||||
PROXY_DECLARE(int) ap_proxy_hex2c(const char *x)
|
||||
{
|
||||
int i, ch;
|
||||
int i;
|
||||
|
||||
#if !APR_CHARSET_EBCDIC
|
||||
ch = x[0];
|
||||
int ch = x[0];
|
||||
|
||||
if (apr_isdigit(ch)) {
|
||||
i = ch - '0';
|
||||
}
|
||||
|
Reference in New Issue
Block a user