From 1adbc5e9e446fb1cb2d67eafe4a19d78dcf312e0 Mon Sep 17 00:00:00 2001 From: montellese Date: Sat, 28 Feb 2015 23:17:23 +0100 Subject: [PATCH 1/3] addons: fix CAddonCallbacksGUI::Dialog_Keyboard_ShowAndVerifyPassword() calling the wrong method --- xbmc/addons/AddonCallbacksGUI.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xbmc/addons/AddonCallbacksGUI.cpp b/xbmc/addons/AddonCallbacksGUI.cpp index 84878fe0c1a5c..3069039410f75 100644 --- a/xbmc/addons/AddonCallbacksGUI.cpp +++ b/xbmc/addons/AddonCallbacksGUI.cpp @@ -1723,10 +1723,10 @@ bool CAddonCallbacksGUI::Dialog_Keyboard_ShowAndVerifyNewPassword(char &strNewPa int CAddonCallbacksGUI::Dialog_Keyboard_ShowAndVerifyPassword(char &strPassword, unsigned int iMaxStringSize, const char *strHeading, int iRetries, unsigned int autoCloseMs) { std::string str = &strPassword; - int bRet = CGUIKeyboardFactory::ShowAndVerifyNewPassword(str, strHeading, iRetries, autoCloseMs); - if (bRet) + int iRet = CGUIKeyboardFactory::ShowAndVerifyPassword(str, strHeading, iRetries, autoCloseMs); + if (iRet) strncpy(&strPassword, str.c_str(), iMaxStringSize); - return bRet; + return iRet; } bool CAddonCallbacksGUI::Dialog_Keyboard_ShowAndGetFilter(char &aTextString, unsigned int iMaxStringSize, bool searching, unsigned int autoCloseMs) From e73ad61c1acf9df6c78b23284b4edadc7e74ef75 Mon Sep 17 00:00:00 2001 From: montellese Date: Sat, 28 Feb 2015 23:19:30 +0100 Subject: [PATCH 2/3] MathUtils: silence warning about implicit cast from double to int --- xbmc/utils/MathUtils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xbmc/utils/MathUtils.h b/xbmc/utils/MathUtils.h index 82165f23d8303..08140b753490a 100644 --- a/xbmc/utils/MathUtils.h +++ b/xbmc/utils/MathUtils.h @@ -159,7 +159,7 @@ namespace MathUtils { assert(x > static_cast(INT_MIN / 2) - 1.0); assert(x < static_cast(INT_MAX / 2) + 1.0); - return x; + return static_cast(x); } inline int64_t abs(int64_t a) From ada3e909bd7825f5b288af5f70ab725113c5ea56 Mon Sep 17 00:00:00 2001 From: montellese Date: Sat, 28 Feb 2015 23:19:55 +0100 Subject: [PATCH 3/3] pvr: silence warning in CPVRRecordings::DeleteAllRecordingsFromTrash() --- xbmc/pvr/recordings/PVRRecordings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xbmc/pvr/recordings/PVRRecordings.cpp b/xbmc/pvr/recordings/PVRRecordings.cpp index 8e88fbeb416d1..3eed672665eb2 100644 --- a/xbmc/pvr/recordings/PVRRecordings.cpp +++ b/xbmc/pvr/recordings/PVRRecordings.cpp @@ -282,7 +282,7 @@ bool CPVRRecordings::RenameRecording(CFileItem &item, std::string &strNewName) bool CPVRRecordings::DeleteAllRecordingsFromTrash() { - return g_PVRClients->DeleteAllRecordingsFromTrash(); + return g_PVRClients->DeleteAllRecordingsFromTrash() == PVR_ERROR_NO_ERROR; } bool CPVRRecordings::SetRecordingsPlayCount(const CFileItemPtr &item, int count)