Browse Source

Merge pull request #8983 from Chocobo1/warning

Initialize variables properly
adaptive-webui-19844
sledgehammer999 7 years ago committed by GitHub
parent
commit
9f4e93df14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/app/stacktrace_win.h
  2. 2
      src/gui/torrentcontentmodel.cpp

2
src/app/stacktrace_win.h

@ -138,7 +138,7 @@ bool straceWin::makeRelativePath(const QString& dir, QString& file)
QString straceWin::getSourcePathAndLineNumber(HANDLE hProcess, DWORD64 addr) QString straceWin::getSourcePathAndLineNumber(HANDLE hProcess, DWORD64 addr)
{ {
IMAGEHLP_LINE64 line = {0}; IMAGEHLP_LINE64 line {};
line.SizeOfStruct = sizeof(IMAGEHLP_LINE64); line.SizeOfStruct = sizeof(IMAGEHLP_LINE64);
DWORD dwDisplacement = 0; DWORD dwDisplacement = 0;

2
src/gui/torrentcontentmodel.cpp

@ -132,7 +132,7 @@ namespace
QPixmap pixmapForExtension(const QString &ext) const override QPixmap pixmapForExtension(const QString &ext) const override
{ {
const QString extWithDot = QLatin1Char('.') + ext; const QString extWithDot = QLatin1Char('.') + ext;
SHFILEINFO sfi = { 0 }; SHFILEINFO sfi {};
HRESULT hr = ::SHGetFileInfoW(extWithDot.toStdWString().c_str(), HRESULT hr = ::SHGetFileInfoW(extWithDot.toStdWString().c_str(),
FILE_ATTRIBUTE_NORMAL, &sfi, sizeof(sfi), SHGFI_ICON | SHGFI_USEFILEATTRIBUTES); FILE_ATTRIBUTE_NORMAL, &sfi, sizeof(sfi), SHGFI_ICON | SHGFI_USEFILEATTRIBUTES);
if (FAILED(hr)) if (FAILED(hr))

Loading…
Cancel
Save