From b5ee8a9a5da92c061261c0072939cf18bfe7b494 Mon Sep 17 00:00:00 2001 From: Shaolin Date: Wed, 8 Aug 2018 01:47:54 -0300 Subject: [PATCH] UI: Prevent format-truncation compiler warning Variables path and dir with the same declared size triggers a compiler warning about possible truncation. Although, depending on the path where profiles are stored, its still possible to go beyong the declared size and the path will be invalid. This will not trigger any compilation warning and all invalid paths will be cought by the already check in the os_glob function. --- UI/window-basic-main-profiles.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UI/window-basic-main-profiles.cpp b/UI/window-basic-main-profiles.cpp index f5db4cd01..82f66d75e 100644 --- a/UI/window-basic-main-profiles.cpp +++ b/UI/window-basic-main-profiles.cpp @@ -143,7 +143,7 @@ static bool GetProfileName(QWidget *parent, std::string &name, static bool CopyProfile(const char *fromPartial, const char *to) { os_glob_t *glob; - char path[512]; + char path[514]; char dir[512]; int ret;