Merge pull request #3452 from Beep6581/cppcheck

merge fixes for a lot of issues reported by Cppcheck
This commit is contained in:
Ingo Weyrich
2016-10-09 22:55:31 +02:00
committed by GitHub
114 changed files with 611 additions and 1777 deletions

View File

@@ -2174,9 +2174,9 @@ bool Options::load ()
} else {
#ifdef WIN32
WCHAR pathW[MAX_PATH] = {0};
char pathA[MAX_PATH];
if (SHGetSpecialFolderPathW(NULL, pathW, CSIDL_LOCAL_APPDATA, false)) {
char pathA[MAX_PATH];
WideCharToMultiByte(CP_UTF8, 0, pathW, -1, pathA, MAX_PATH, 0, 0);
rtdir = Glib::build_filename(Glib::ustring(pathA), Glib::ustring(CACHEFOLDERNAME));
}