Fix some problems with more strict compilers (#1923)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2408 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.22
Stefan Bühler 14 years ago
parent fbaceca37c
commit a6218765c2

@ -12,6 +12,7 @@ NEWS
* Fix segfault in mod_scgi (fixes #1911)
* Treat EPIPE as connection-closed error in network_freebsd_sendfile.c (another fix from #1913)
* Fix useless redirection of stderr in mod_rrdtool, as it gets redirected to /dev/null later. (fixes #1922)
* Fix some problems with more strict compilers (#1923)
- 1.4.21 - 2009-02-16

@ -492,9 +492,9 @@ typedef struct {
enum { STAT_CACHE_ENGINE_UNSET,
STAT_CACHE_ENGINE_NONE,
STAT_CACHE_ENGINE_SIMPLE,
STAT_CACHE_ENGINE_SIMPLE
#ifdef HAVE_FAM_H
STAT_CACHE_ENGINE_FAM
, STAT_CACHE_ENGINE_FAM
#endif
} stat_cache_engine;
unsigned short enable_cores;

@ -1006,13 +1006,11 @@ int config_read(server *srv, const char *fn) {
context_init(srv, &context);
context.all_configs = srv->config_context;
pos = strrchr(fn,
#ifdef __WIN32
'\\'
pos = strrchr(fn, '\\');
#else
'/'
pos = strrchr(fn, '/');
#endif
);
if (pos) {
buffer_copy_string_len(context.basedir, fn, pos - fn + 1);
fn = pos + 1;

@ -1,4 +1,5 @@
#include "base.h"
#include "connections.h"
const char *connection_get_state(connection_state_t state) {
switch (state) {

@ -9,6 +9,7 @@
#include "buffer.h"
#include "log.h"
#include "etag.h"
#include "response.h"
/*
* This was 'borrowed' from tcpdump.

@ -180,12 +180,14 @@ static char *yyTracePrompt = 0;
** Outputs:
** None.
*/
#if 0
void ParseTrace(FILE *TraceFILE, char *zTracePrompt){
yyTraceFILE = TraceFILE;
yyTracePrompt = zTracePrompt;
if( yyTraceFILE==0 ) yyTracePrompt = 0;
else if( yyTracePrompt==0 ) yyTraceFILE = 0;
}
#endif
#endif /* NDEBUG */
#ifndef NDEBUG
@ -208,6 +210,7 @@ static const char *yyRuleName[] = {
** This function returns the symbolic name associated with a token
** value.
*/
#if 0
const char *ParseTokenName(int tokenType){
#ifndef NDEBUG
if( tokenType>0 && (size_t)tokenType<(sizeof(yyTokenName)/sizeof(yyTokenName[0])) ){
@ -219,6 +222,7 @@ const char *ParseTokenName(int tokenType){
return "";
#endif
}
#endif
/*
** This function allocates a new parser.
@ -511,9 +515,9 @@ static void yy_syntax_error(
int yymajor, /* The major type of the error token */
YYMINORTYPE yyminor /* The minor type of the error token */
){
ParseARG_FETCH;
UNUSED(yymajor);
UNUSED(yyminor);
ParseARG_FETCH;
#define TOKEN (yyminor.yy0)
%%
ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */

@ -144,7 +144,7 @@ URIHANDLER_FUNC(mod_evasive_uri_handler) {
case AF_INET6:
#endif
break;
default: // Address family not supported
default: /* Address family not supported */
return HANDLER_GO_ON;
};

@ -1160,8 +1160,8 @@ int webdav_has_lock(server *srv, connection *con, plugin_data *p, buffer *uri) {
int has_lock = 1;
#ifdef USE_LOCKS
UNUSED(srv);
data_string *ds;
UNUSED(srv);
/**
* This implementation is more fake than real

Loading…
Cancel
Save