[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 20/24] If FILENAME_MAX is defined, use it instead of arbitrary value (fix format-truncation errors with GCC >= 7)
--- tools/xenpmd/xenpmd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/xenpmd/xenpmd.c b/tools/xenpmd/xenpmd.c index 12b82cf43e..cfd22e64e3 100644 --- a/tools/xenpmd/xenpmd.c +++ b/tools/xenpmd/xenpmd.c @@ -101,7 +101,11 @@ FILE *get_next_battery_file(DIR *battery_dir, { FILE *file = 0; struct dirent *dir_entries; +#ifdef FILENAME_MAX + char file_name[FILENAME_MAX]; +#else char file_name[284]; +#endif int ret; do -- 2.28.0
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |