From b98f73e51bd8c227582fb2b18732517884e21ab9 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Wed, 21 Nov 2018 15:17:11 +0100 Subject: [PATCH] Use unsigned int to avoid undefined behaviour when shifting a signed by 31 bits --- rtgui/dirbrowser.cc | 2 +- rtgui/dirbrowser.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rtgui/dirbrowser.cc b/rtgui/dirbrowser.cc index 9ed8455fe..81ee85fed 100644 --- a/rtgui/dirbrowser.cc +++ b/rtgui/dirbrowser.cc @@ -220,7 +220,7 @@ void DirBrowser::updateDirTree (const Gtk::TreeModel::iterator& iter) void DirBrowser::updateVolumes () { - int nvolumes = GetLogicalDrives (); + unsigned int nvolumes = GetLogicalDrives (); if (nvolumes != volumes) { GThreadLock lock; diff --git a/rtgui/dirbrowser.h b/rtgui/dirbrowser.h index e8eefdd36..a3f451101 100644 --- a/rtgui/dirbrowser.h +++ b/rtgui/dirbrowser.h @@ -84,7 +84,7 @@ private: bool expandSuccess; #ifdef WIN32 - int volumes; + unsigned int volumes; public: void updateVolumes (); void updateDirTree (const Gtk::TreeModel::iterator& iter);