test: remove a compiler warning

Leftover from a previous iteration of this code - having a static but
unnecessarily large size for dirname results in:

../test/litest.c:1251:38: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=]
   snprintf(dest, sizeof(dest), "%s/%s", dirname, filename);
                                      ^
../test/litest.c:1251:3: note: ‘snprintf’ output 2 or more bytes (assuming 4097) into a destination of size 4096
   snprintf(dest, sizeof(dest), "%s/%s", dirname, filename);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2018-06-19 13:13:24 +10:00
parent 17c4609645
commit 4de756766c

View file

@ -1229,7 +1229,7 @@ litest_install_quirks(struct list *created_files_list)
{
struct litest_test_device **dev = devices;
struct created_file *file;
char dirname[PATH_MAX] = "/run/litest-XXXXXX";
char dirname[] = "/run/litest-XXXXXX";
char **quirks, **q;
litest_assert_notnull(mkdtemp(dirname));