Fix two compiler warnings

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2732 152afb58-edef-0310-8abb-c4023f1b3aa9
This commit is contained in:
Stefan Bühler 2010-07-04 07:45:25 +00:00
parent bcb4f31188
commit a61e0bdde0
3 changed files with 5 additions and 2 deletions

1
NEWS
View File

@ -15,6 +15,7 @@ NEWS
* Include IP addresses on error log on password failures (fixes #2191)
* Fix stalls while reading from ssl sockets (fixes #2197)
* Fix etag formatting on boxes with 32-bit longs
* Fix two compiler warnings
- 1.4.26 - 2010-02-07
* Fix request parser to handle packets with splitted \r\n\r\n (fixes #2105)

View File

@ -69,8 +69,8 @@ static int data_response_insert_dup(data_unset *dst, data_unset *src) {
static void data_string_print(const data_unset *d, int depth) {
data_string *ds = (data_string *)d;
unsigned int i;
UNUSED(depth);
unsigned int i = 0;
/* empty and uninitialized strings */
if (ds->value->used < 1) {

View File

@ -213,7 +213,9 @@ static server *server_init(void) {
if ((NULL != (frandom = fopen("/dev/urandom", "rb")) || NULL != (frandom = fopen("/dev/random", "rb")))
&& 1 == fread(srv->entropy, sizeof(srv->entropy), 1, frandom)) {
srand(*(unsigned int*)srv->entropy);
unsigned int e;
memcpy(&e, srv->entropy, sizeof(e) < sizeof(srv->entropy) ? sizeof(e) : sizeof(srv->entropy));
srand(e);
srv->is_real_entropy = 1;
} else {
unsigned int j;