Squash -DMG_ENABLE_FS=0 build warning

This commit is contained in:
cpq 2020-12-24 18:48:28 +00:00
parent 60e1b64455
commit 4c3b97be7d
2 changed files with 2 additions and 2 deletions

View File

@ -639,6 +639,7 @@ void mg_http_reply(struct mg_connection *c, int code, const char *headers,
if (buf != mem) free(buf);
}
#if MG_ENABLE_FS
static void http_cb(struct mg_connection *, int, void *, void *);
static void restore_http_cb(struct mg_connection *c) {
struct http_data *d = (struct http_data *) c->pfn_data;
@ -648,7 +649,6 @@ static void restore_http_cb(struct mg_connection *c) {
free(d);
}
#if MG_ENABLE_FS
char *mg_http_etag(char *buf, size_t len, struct stat *st) {
snprintf(buf, len, "\"%lx.%lu\"", (unsigned long) st->st_mtime,
(unsigned long) st->st_size);

View File

@ -240,6 +240,7 @@ void mg_http_reply(struct mg_connection *c, int code, const char *headers,
if (buf != mem) free(buf);
}
#if MG_ENABLE_FS
static void http_cb(struct mg_connection *, int, void *, void *);
static void restore_http_cb(struct mg_connection *c) {
struct http_data *d = (struct http_data *) c->pfn_data;
@ -249,7 +250,6 @@ static void restore_http_cb(struct mg_connection *c) {
free(d);
}
#if MG_ENABLE_FS
char *mg_http_etag(char *buf, size_t len, struct stat *st) {
snprintf(buf, len, "\"%lx.%lu\"", (unsigned long) st->st_mtime,
(unsigned long) st->st_size);