mirror of
https://github.com/apache/httpd.git
synced 2025-11-05 05:30:39 +03:00
Fix string constness to get rid of gcc compiler warnings by -Wwrite-strings.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@894368 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -2682,7 +2682,7 @@ AP_DECLARE(const char *) ap_psignature(const char *prefix, request_rec *r)
|
||||
|
||||
static char *server_banner = NULL;
|
||||
static int banner_locked = 0;
|
||||
static char *server_description = NULL;
|
||||
static const char *server_description = NULL;
|
||||
|
||||
enum server_token_type {
|
||||
SrvTk_MAJOR, /* eg: Apache/2 */
|
||||
|
||||
@@ -50,8 +50,8 @@
|
||||
#include "ap_mpm.h"
|
||||
|
||||
typedef struct {
|
||||
char *t_name;
|
||||
int t_val;
|
||||
const char *t_name;
|
||||
int t_val;
|
||||
} TRANS;
|
||||
|
||||
APR_HOOK_STRUCT(
|
||||
|
||||
@@ -89,7 +89,7 @@ static int auth_internal_per_conf_hooks = 0;
|
||||
static int auth_internal_per_conf_providers = 0;
|
||||
|
||||
|
||||
static int decl_die(int status, char *phase, request_rec *r)
|
||||
static int decl_die(int status, const char *phase, request_rec *r)
|
||||
{
|
||||
if (status == DECLINED) {
|
||||
ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r,
|
||||
|
||||
@@ -35,8 +35,8 @@ AP_DECLARE(apr_status_t) ap_cookie_write(request_rec * r, const char *name, cons
|
||||
const char *attrs, long maxage, ...)
|
||||
{
|
||||
|
||||
char *buffer;
|
||||
char *rfc2109;
|
||||
const char *buffer;
|
||||
const char *rfc2109;
|
||||
apr_table_t *t;
|
||||
va_list vp;
|
||||
|
||||
@@ -79,8 +79,8 @@ AP_DECLARE(apr_status_t) ap_cookie_write2(request_rec * r, const char *name2, co
|
||||
const char *attrs2, long maxage, ...)
|
||||
{
|
||||
|
||||
char *buffer;
|
||||
char *rfc2965;
|
||||
const char *buffer;
|
||||
const char *rfc2965;
|
||||
apr_table_t *t;
|
||||
va_list vp;
|
||||
|
||||
@@ -121,7 +121,7 @@ AP_DECLARE(apr_status_t) ap_cookie_remove(request_rec * r, const char *name, con
|
||||
va_list vp;
|
||||
|
||||
/* create RFC2109 compliant cookie */
|
||||
char *rfc2109 = apr_pstrcat(r->pool, name, "=;Max-Age=0;",
|
||||
const char *rfc2109 = apr_pstrcat(r->pool, name, "=;Max-Age=0;",
|
||||
attrs ? attrs : CLEAR_ATTRS, NULL);
|
||||
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, LOG_PREFIX
|
||||
"user '%s' removed cookie: '%s'", r->user, rfc2109);
|
||||
@@ -149,7 +149,7 @@ AP_DECLARE(apr_status_t) ap_cookie_remove2(request_rec * r, const char *name2, c
|
||||
va_list vp;
|
||||
|
||||
/* create RFC2965 compliant cookie */
|
||||
char *rfc2965 = apr_pstrcat(r->pool, name2, "=;Max-Age=0;",
|
||||
const char *rfc2965 = apr_pstrcat(r->pool, name2, "=;Max-Age=0;",
|
||||
attrs2 ? attrs2 : CLEAR_ATTRS, NULL);
|
||||
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, LOG_PREFIX
|
||||
"user '%s' removed cookie2: '%s'", r->user, rfc2965);
|
||||
@@ -178,7 +178,7 @@ static int extract_cookie_line(ap_cookie_do * v, const char *key, const char *va
|
||||
char *cookie = apr_pstrdup(v->r->pool, val);
|
||||
const char *name = apr_pstrcat(v->r->pool, v->name ? v->name : "", "=", NULL);
|
||||
size_t len = strlen(name);
|
||||
char *new_cookie = "";
|
||||
const char *new_cookie = "";
|
||||
const char *comma = ",";
|
||||
char *next1;
|
||||
const char *semi = ";";
|
||||
|
||||
@@ -121,9 +121,9 @@ AP_DECLARE(void) ap_add_common_vars(request_rec *r)
|
||||
server_rec *s = r->server;
|
||||
conn_rec *c = r->connection;
|
||||
const char *rem_logname;
|
||||
char *env_path;
|
||||
const char *env_path;
|
||||
#if defined(WIN32) || defined(OS2)
|
||||
char *env_temp;
|
||||
const char *env_temp;
|
||||
#endif
|
||||
const char *host;
|
||||
const apr_array_header_t *hdrs_arr = apr_table_elts(r->headers_in);
|
||||
|
||||
Reference in New Issue
Block a user