Fix warnings on newer versions of GCC

PUBLISHED_FROM=f1d25145446057fed9e8d634ca637364ca43a5e8
This commit is contained in:
Deomid Ryabkov 2018-07-09 11:01:54 +03:00 committed by Cesanta Bot
parent cdb8d7b692
commit 98c99279c3
2 changed files with 2 additions and 2 deletions

View File

@ -7604,7 +7604,7 @@ static void mg_scan_directory(struct mg_connection *nc, const char *dir,
const struct mg_serve_http_opts *opts, const struct mg_serve_http_opts *opts,
void (*func)(struct mg_connection *, const char *, void (*func)(struct mg_connection *, const char *,
cs_stat_t *)) { cs_stat_t *)) {
char path[MG_MAX_PATH]; char path[MG_MAX_PATH + 1];
cs_stat_t st; cs_stat_t st;
struct dirent *dp; struct dirent *dp;
DIR *dirp; DIR *dirp;

View File

@ -2026,7 +2026,7 @@ static void mg_scan_directory(struct mg_connection *nc, const char *dir,
const struct mg_serve_http_opts *opts, const struct mg_serve_http_opts *opts,
void (*func)(struct mg_connection *, const char *, void (*func)(struct mg_connection *, const char *,
cs_stat_t *)) { cs_stat_t *)) {
char path[MG_MAX_PATH]; char path[MG_MAX_PATH + 1];
cs_stat_t st; cs_stat_t st;
struct dirent *dp; struct dirent *dp;
DIR *dirp; DIR *dirp;