Fix Windows builds

Suppress warnings for:
* non-ascii character;
* non-constant aggregate initializer;
* assignment within conditional expression;
* return value type mismatch.
pull/35/head
YeahO_O Yuan 2016-01-25 19:45:06 +08:00
parent 69105c65d8
commit bbd0300488
3 changed files with 14 additions and 12 deletions

View File

@ -620,7 +620,9 @@ make_content_buf(
#if NGX_PCRE
{
ngx_str_t str = { len, ngx_de_name(&dir) };
ngx_str_t str;
str.len = len;
str.data = ngx_de_name(&dir);
if (alcf->ignore && ngx_regex_exec_array(alcf->ignore, &str,
r->connection->log)
@ -1025,7 +1027,7 @@ ngx_http_fancyindex_handler(ngx_http_request_t *r)
return NGX_DECLINED;
}
if ((rc = make_content_buf(r, &out[0].buf, alcf) != NGX_OK))
if ((rc = make_content_buf(r, &out[0].buf, alcf)) != NGX_OK)
return rc;
out[0].buf->last_in_chain = 1;
@ -1197,7 +1199,7 @@ ngx_http_fancyindex_cmp_entries_size_desc(const void *one, const void *two)
return 1;
}
return second->size - first->size;
return (int) (second->size - first->size);
}
@ -1215,7 +1217,7 @@ ngx_http_fancyindex_cmp_entries_mtime_desc(const void *one, const void *two)
return 1;
}
return second->mtime - first->mtime;
return (int) (second->mtime - first->mtime);
}
@ -1251,7 +1253,7 @@ ngx_http_fancyindex_cmp_entries_size_asc(const void *one, const void *two)
return 1;
}
return first->size - second->size;
return (int) (first->size - second->size);
}
@ -1269,7 +1271,7 @@ ngx_http_fancyindex_cmp_entries_mtime_asc(const void *one, const void *two)
return 1;
}
return first->mtime - second->mtime;
return (int) (first->mtime - second->mtime);
}

View File

@ -66,9 +66,9 @@ static const u_char t06_list1[] = ""
"\n"
"<thead>"
"<tr>"
"<th><a href=\"?C=N&O=A\">File Name</a>&nbsp;<a href=\"?C=N&O=D\">&nbsp;&nbsp;</a></th>"
"<th><a href=\"?C=S&O=A\">File Size</a>&nbsp;<a href=\"?C=S&O=D\">&nbsp;&nbsp;</a></th>"
"<th><a href=\"?C=M&O=A\">Date</a>&nbsp;<a href=\"?C=M&O=D\">&nbsp;&nbsp;</a></th>"
"<th><a href=\"?C=N&O=A\">File Name</a>&nbsp;<a href=\"?C=N&O=D\">&nbsp;&#8595;&nbsp;</a></th>"
"<th><a href=\"?C=S&O=A\">File Size</a>&nbsp;<a href=\"?C=S&O=D\">&nbsp;&#8595;&nbsp;</a></th>"
"<th><a href=\"?C=M&O=A\">Date</a>&nbsp;<a href=\"?C=M&O=D\">&nbsp;&#8595;&nbsp;</a></th>"
"</tr>"
"</thead>"
"\n"

View File

@ -64,9 +64,9 @@
<thead>
<tr>
<th><a href="?C=N&O=A">File Name</a>&nbsp;<a href="?C=N&O=D">&nbsp;&nbsp;</a></th>
<th><a href="?C=S&O=A">File Size</a>&nbsp;<a href="?C=S&O=D">&nbsp;&nbsp;</a></th>
<th><a href="?C=M&O=A">Date</a>&nbsp;<a href="?C=M&O=D">&nbsp;&nbsp;</a></th>
<th><a href="?C=N&O=A">File Name</a>&nbsp;<a href="?C=N&O=D">&nbsp;&#8595;&nbsp;</a></th>
<th><a href="?C=S&O=A">File Size</a>&nbsp;<a href="?C=S&O=D">&nbsp;&#8595;&nbsp;</a></th>
<th><a href="?C=M&O=A">Date</a>&nbsp;<a href="?C=M&O=D">&nbsp;&#8595;&nbsp;</a></th>
</tr>
</thead>