Fix uninitialized variables
This commit is contained in:
@@ -49,6 +49,7 @@ SystemTrayIcon::SystemTrayIcon(QObject *parent)
|
||||
action_stop_(nullptr),
|
||||
action_stop_after_this_track_(nullptr),
|
||||
action_mute_(nullptr),
|
||||
action_love_(nullptr),
|
||||
available_(false),
|
||||
trayicon_progress_(false),
|
||||
song_progress_(0) {
|
||||
|
||||
@@ -203,7 +203,7 @@ QString PrettySize(const quint64 bytes) {
|
||||
quint64 FileSystemCapacity(const QString &path) {
|
||||
|
||||
#if defined(Q_OS_UNIX)
|
||||
struct statvfs fs_info;
|
||||
struct statvfs fs_info {};
|
||||
if (statvfs(path.toLocal8Bit().constData(), &fs_info) == 0)
|
||||
return quint64(fs_info.f_blocks) * quint64(fs_info.f_bsize);
|
||||
#elif defined(Q_OS_WIN32)
|
||||
@@ -220,7 +220,7 @@ quint64 FileSystemCapacity(const QString &path) {
|
||||
quint64 FileSystemFreeSpace(const QString &path) {
|
||||
|
||||
#if defined(Q_OS_UNIX)
|
||||
struct statvfs fs_info;
|
||||
struct statvfs fs_info{};
|
||||
if (statvfs(path.toLocal8Bit().constData(), &fs_info) == 0)
|
||||
return quint64(fs_info.f_bavail) * quint64(fs_info.f_bsize);
|
||||
#elif defined(Q_OS_WIN32)
|
||||
|
||||
Reference in New Issue
Block a user