netutils/webserver/httpd_dirlist.c: Fix a printf format warning

This commit is contained in:
YAMAMOTO Takashi 2020-11-13 16:55:38 +09:00 committed by Xiang Xiao
parent 28296d539d
commit b4651db64f

View File

@ -30,6 +30,7 @@
#include <limits.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdint.h>
#include <stdio.h>
#include <errno.h>
#include <debug.h>
@ -218,8 +219,8 @@ ssize_t httpd_dirlist(int outfd, FAR struct httpd_fs_file *file)
}
else
{
snprintf(size, sizeof(size), "%d",
buf.st_size);
snprintf(size, sizeof(size), "%jd",
(uintmax_t)buf.st_size);
snprintf(tmp, BUF_SIZE, ENTRY,
dent->d_name, "", dent->d_name, "",