Skip to content

Commit 61b10ea

Browse files
committed
Why should Ryan have all the fun? Cleans up compiler warning emits. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85263 13f79535-47bb-0310-9956-ffa450edef68
1 parent 7b18201 commit 61b10ea

2 files changed

Lines changed: 14 additions & 8 deletions

File tree

modules/cache/mod_file_cache.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,10 +274,12 @@ static void file_cache_post_config(ap_pool_t *p, ap_pool_t *plog,
274274
ap_pool_t *ptemp, server_rec *s)
275275
{
276276
a_server_config *sconf;
277-
ap_array_header_t *inodes;
278277
a_file *elts;
279278
int nelts;
279+
#ifndef WIN32
280+
ap_array_header_t *inodes;
280281
int i;
282+
#endif
281283

282284
context = p;
283285
/* sort the elements of the main_server, by filename */
@@ -391,9 +393,11 @@ static int file_cache_handler(request_rec *r)
391393
a_server_config *sconf;
392394
a_file tmp;
393395
a_file *ptmp;
394-
a_file **pmatch;
395396
a_file *match;
396397
int rangestatus, errstatus;
398+
#ifndef WIN32
399+
a_file **pmatch;
400+
#endif
397401

398402
/* we don't handle anything but GET */
399403
if (r->method_number != M_GET) return DECLINED;

support/rotatelogs.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,19 @@
6161
*/
6262

6363

64-
#define BUFSIZE 65536
65-
#ifdef MAX_PATH
66-
#undef MAX_PATH
67-
#endif
68-
#define MAX_PATH 1024
69-
7064
#include "ap_config.h"
7165
#include <time.h>
7266
#include <errno.h>
7367
#include <fcntl.h>
7468
#include <stdio.h>
7569
#include <stdlib.h>
7670

71+
#define BUFSIZE 65536
72+
73+
#ifndef MAX_PATH
74+
#define MAX_PATH 1024
75+
#endif
76+
7777
int main (int argc, char *argv[])
7878
{
7979
char buf[BUFSIZE], buf2[MAX_PATH];
@@ -138,4 +138,6 @@ int main (int argc, char *argv[])
138138
exit(5);
139139
}
140140
}
141+
/* Of course we never, but prevent compiler warnings */
142+
return 0;
141143
}

0 commit comments

Comments
 (0)