mirror of
https://github.com/apache/httpd.git
synced 2025-11-15 12:41:11 +03:00
Remove APLOG_NOERRNO.
Add some APLOGNO. Fix some alignment. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1612466 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -1 +1 @@
|
|||||||
2793
|
2804
|
||||||
|
|||||||
@@ -115,8 +115,7 @@ static apr_array_header_t *get_arguments(apr_pool_t * pool, const char *line)
|
|||||||
/*
|
/*
|
||||||
warn if anything non blank appears, but ignore comments...
|
warn if anything non blank appears, but ignore comments...
|
||||||
*/
|
*/
|
||||||
static void warn_if_non_blank(
|
static void warn_if_non_blank(const char * what,
|
||||||
const char * what,
|
|
||||||
char * ptr,
|
char * ptr,
|
||||||
ap_configfile_t * cfg)
|
ap_configfile_t * cfg)
|
||||||
{
|
{
|
||||||
@@ -125,7 +124,7 @@ static void warn_if_non_blank(
|
|||||||
if (*p == '#')
|
if (*p == '#')
|
||||||
break;
|
break;
|
||||||
if (*p != ' ' && *p != '\t') {
|
if (*p != ' ' && *p != '\t') {
|
||||||
ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_WARNING, 0, NULL,
|
ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL,
|
||||||
"%s on line %d of %s: %s",
|
"%s on line %d of %s: %s",
|
||||||
what, cfg->line_number, cfg->name, ptr);
|
what, cfg->line_number, cfg->name, ptr);
|
||||||
break;
|
break;
|
||||||
@@ -164,8 +163,8 @@ static char *get_lines_till_end_token(apr_pool_t * pool,
|
|||||||
if (!strncmp(first, "</", 2)) {
|
if (!strncmp(first, "</", 2)) {
|
||||||
any_nesting--;
|
any_nesting--;
|
||||||
if (any_nesting < 0) {
|
if (any_nesting < 0) {
|
||||||
ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_WARNING,
|
ap_log_error(APLOG_MARK, APLOG_WARNING,
|
||||||
0, NULL,
|
0, NULL, APLOGNO(02793)
|
||||||
"bad (negative) nesting on line %d of %s",
|
"bad (negative) nesting on line %d of %s",
|
||||||
config_file->line_number - line_number_start,
|
config_file->line_number - line_number_start,
|
||||||
where);
|
where);
|
||||||
@@ -185,14 +184,14 @@ static char *get_lines_till_end_token(apr_pool_t * pool,
|
|||||||
}
|
}
|
||||||
|
|
||||||
warn_if_non_blank(
|
warn_if_non_blank(
|
||||||
"non blank chars found after directive closing",
|
APLOGNO(02794) "non blank chars found after directive closing",
|
||||||
endp+1, config_file);
|
endp+1, config_file);
|
||||||
|
|
||||||
macro_nesting--;
|
macro_nesting--;
|
||||||
if (!macro_nesting) {
|
if (!macro_nesting) {
|
||||||
if (any_nesting) {
|
if (any_nesting) {
|
||||||
ap_log_error(APLOG_MARK,
|
ap_log_error(APLOG_MARK,
|
||||||
APLOG_NOERRNO | APLOG_WARNING, 0, NULL,
|
APLOG_WARNING, 0, NULL, APLOGNO(02795)
|
||||||
"bad cumulated nesting (%+d) in %s",
|
"bad cumulated nesting (%+d) in %s",
|
||||||
any_nesting, where);
|
any_nesting, where);
|
||||||
}
|
}
|
||||||
@@ -257,7 +256,7 @@ static const char *check_macro_arguments(apr_pool_t * pool,
|
|||||||
macro->name, macro->location, i + 1);
|
macro->name, macro->location, i + 1);
|
||||||
}
|
}
|
||||||
else if (!looks_like_an_argument(tab[i])) {
|
else if (!looks_like_an_argument(tab[i])) {
|
||||||
ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_WARNING, 0, NULL,
|
ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, APLOGNO(02796)
|
||||||
"macro '%s' (%s) "
|
"macro '%s' (%s) "
|
||||||
"argument name '%s' (#%d) without expected prefix, "
|
"argument name '%s' (#%d) without expected prefix, "
|
||||||
"better prefix argument names with one of '%s'.",
|
"better prefix argument names with one of '%s'.",
|
||||||
@@ -281,11 +280,11 @@ static const char *check_macro_arguments(apr_pool_t * pool,
|
|||||||
/* warn about common prefix, but only if non empty names */
|
/* warn about common prefix, but only if non empty names */
|
||||||
if (ltabi && ltabj &&
|
if (ltabi && ltabj &&
|
||||||
!strncmp(tab[i], tab[j], ltabi < ltabj ? ltabi : ltabj)) {
|
!strncmp(tab[i], tab[j], ltabi < ltabj ? ltabi : ltabj)) {
|
||||||
ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_WARNING,
|
ap_log_error(APLOG_MARK, APLOG_WARNING,
|
||||||
0, NULL,
|
0, NULL, APLOGNO(02797)
|
||||||
"macro '%s' (%s): "
|
"macro '%s' (%s): "
|
||||||
"argument name prefix conflict (%s #%d and %s #%d),"
|
"argument name prefix conflict (%s #%d and %s #%d), "
|
||||||
" be careful about your macro definition!",
|
"be careful about your macro definition!",
|
||||||
macro->name, macro->location,
|
macro->name, macro->location,
|
||||||
tab[i], i + 1, tab[j], j + 1);
|
tab[i], i + 1, tab[j], j + 1);
|
||||||
}
|
}
|
||||||
@@ -305,7 +304,7 @@ static void check_macro_use_arguments(const char *where,
|
|||||||
int i;
|
int i;
|
||||||
for (i = 0; i < array->nelts; i++) {
|
for (i = 0; i < array->nelts; i++) {
|
||||||
if (empty_string_p(tab[i])) {
|
if (empty_string_p(tab[i])) {
|
||||||
ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_WARNING, 0, NULL,
|
ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, APLOGNO(02798)
|
||||||
"%s: empty argument #%d", where, i + 1);
|
"%s: empty argument #%d", where, i + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -506,7 +505,7 @@ static const char *check_macro_contents(apr_pool_t * pool,
|
|||||||
const char *errmsg;
|
const char *errmsg;
|
||||||
|
|
||||||
if (macro->contents->nelts == 0) {
|
if (macro->contents->nelts == 0) {
|
||||||
ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_WARNING, 0, NULL,
|
ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, APLOGNO(02799)
|
||||||
"macro '%s' (%s): empty contents!",
|
"macro '%s' (%s): empty contents!",
|
||||||
macro->name, macro->location);
|
macro->name, macro->location);
|
||||||
return NULL; /* no need to further warnings... */
|
return NULL; /* no need to further warnings... */
|
||||||
@@ -526,7 +525,7 @@ static const char *check_macro_contents(apr_pool_t * pool,
|
|||||||
|
|
||||||
for (i = 0; i < nelts; i++) {
|
for (i = 0; i < nelts; i++) {
|
||||||
if (!used->elts[i]) {
|
if (!used->elts[i]) {
|
||||||
ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_WARNING, 0, NULL,
|
ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, APLOGNO(02800)
|
||||||
"macro '%s' (%s): argument '%s' (#%d) never used",
|
"macro '%s' (%s): argument '%s' (#%d) never used",
|
||||||
macro->name, macro->location, names[i], i + 1);
|
macro->name, macro->location, names[i], i + 1);
|
||||||
}
|
}
|
||||||
@@ -719,7 +718,8 @@ static const char *macro_section(cmd_parms * cmd,
|
|||||||
return BEGIN_MACRO " macro definition: empty name";
|
return BEGIN_MACRO " macro definition: empty name";
|
||||||
}
|
}
|
||||||
|
|
||||||
warn_if_non_blank("non blank chars found after " BEGIN_MACRO " closing '>'",
|
warn_if_non_blank(APLOGNO(02801) "non blank chars found after "
|
||||||
|
BEGIN_MACRO " closing '>'",
|
||||||
endp+1, cmd->config_file);
|
endp+1, cmd->config_file);
|
||||||
|
|
||||||
/* coldly drop '>[^>]*$' out */
|
/* coldly drop '>[^>]*$' out */
|
||||||
@@ -736,7 +736,7 @@ static const char *macro_section(cmd_parms * cmd,
|
|||||||
|
|
||||||
if (macro != NULL) {
|
if (macro != NULL) {
|
||||||
/* already defined: warn about the redefinition */
|
/* already defined: warn about the redefinition */
|
||||||
ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_WARNING, 0, NULL,
|
ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, APLOGNO(02802)
|
||||||
"macro '%s' multiply defined: "
|
"macro '%s' multiply defined: "
|
||||||
"%s, redefined on line %d of \"%s\"",
|
"%s, redefined on line %d of \"%s\"",
|
||||||
macro->name, macro->location,
|
macro->name, macro->location,
|
||||||
@@ -761,7 +761,7 @@ static const char *macro_section(cmd_parms * cmd,
|
|||||||
apr_psprintf(pool, "macro '%s' (%s)", macro->name, macro->location);
|
apr_psprintf(pool, "macro '%s' (%s)", macro->name, macro->location);
|
||||||
|
|
||||||
if (looks_like_an_argument(name)) {
|
if (looks_like_an_argument(name)) {
|
||||||
ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_WARNING, 0, NULL,
|
ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, APLOGNO(02803)
|
||||||
"%s better prefix a macro name with any of '%s'",
|
"%s better prefix a macro name with any of '%s'",
|
||||||
where, ARG_PREFIX);
|
where, ARG_PREFIX);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user