Fix #1297 - %p warning

This commit is contained in:
Sergey Lyubka 2021-07-14 04:00:27 +01:00
parent 39d64be581
commit 80fcba91c8
3 changed files with 6 additions and 6 deletions

View File

@ -28,8 +28,8 @@ static void cb(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
static void usage(const char *prog) {
fprintf(stderr,
"Mongoose v.%s, built " __DATE__ " " __TIME__
"\nUsage: %s OPTIONS\n"
"Mongoose v.%s\n"
"Usage: %s OPTIONS\n"
" -H yes|no - enable traffic hexdump, default: '%s'\n"
" -S GLOB - glob pattern for SSI files, default: '%s'\n"
" -d DIR - directory to serve, default: '%s'\n"

View File

@ -929,8 +929,8 @@ void mg_http_serve_file(struct mg_connection *c, struct mg_http_message *hm,
FILE *fp = mg_fopen(path, "rb");
if (fp == NULL || mg_stat(path, &st) != 0 ||
mg_http_etag(etag, sizeof(etag), &st) != etag) {
LOG(LL_DEBUG,
("404 [%.*s] [%s] %p", (int) hm->uri.len, hm->uri.ptr, path, fp));
LOG(LL_DEBUG, ("404 [%.*s] [%s] %p", (int) hm->uri.len, hm->uri.ptr, path,
(void *) fp));
mg_http_reply(c, 404, "", "%s", "Not found\n");
if (fp != NULL) fclose(fp);
} else if (inm != NULL && mg_vcasecmp(inm, etag) == 0) {

View File

@ -518,8 +518,8 @@ void mg_http_serve_file(struct mg_connection *c, struct mg_http_message *hm,
FILE *fp = mg_fopen(path, "rb");
if (fp == NULL || mg_stat(path, &st) != 0 ||
mg_http_etag(etag, sizeof(etag), &st) != etag) {
LOG(LL_DEBUG,
("404 [%.*s] [%s] %p", (int) hm->uri.len, hm->uri.ptr, path, fp));
LOG(LL_DEBUG, ("404 [%.*s] [%s] %p", (int) hm->uri.len, hm->uri.ptr, path,
(void *) fp));
mg_http_reply(c, 404, "", "%s", "Not found\n");
if (fp != NULL) fclose(fp);
} else if (inm != NULL && mg_vcasecmp(inm, etag) == 0) {