Ticket #11992: 0004-Fix-GCC-5-logical-not-parentheses-warnings.patch

File 0004-Fix-GCC-5-logical-not-parentheses-warnings.patch, 2.3 KB (added by mt, 5 years ago)
  • src/apps/screenshot/Screenshot.cpp

    From 3461f3b18501f07db5fe2a53950eb9ce1002ff2c Mon Sep 17 00:00:00 2001
    From: Murai Takashi <tmurai01@gmail.com>
    Date: Sun, 19 Apr 2015 18:01:13 +0900
    Subject: [PATCH 4/6] Fix GCC 5 logical-not-parentheses warnings.
    
    ---
     src/apps/screenshot/Screenshot.cpp | 2 +-
     src/kits/tracker/SettingsViews.cpp | 4 ++--
     src/kits/tracker/TaskLoop.cpp      | 2 +-
     3 files changed, 4 insertions(+), 4 deletions(-)
    
    diff --git a/src/apps/screenshot/Screenshot.cpp b/src/apps/screenshot/Screenshot.cpp
    index 88bac5d..415d7f3 100644
    a b Screenshot::_GetActiveWindowFrame()  
    308308                token = tokens[i];
    309309                windowInfo = get_window_info(token);
    310310                if (windowInfo && !windowInfo->is_mini
    311                         && !windowInfo->show_hide_level > 0) {
     311                        && windowInfo->show_hide_level <= 0) {
    312312                    foundActiveWindow = true;
    313313                    break;
    314314                }
  • src/kits/tracker/SettingsViews.cpp

    diff --git a/src/kits/tracker/SettingsViews.cpp b/src/kits/tracker/SettingsViews.cpp
    index 4b80b8c..fa4d513 100644
    a b DesktopSettingsView::MessageReceived(BMessage* message)  
    234234        {
    235235            // Turn on and off related settings:
    236236            fMountVolumesOntoDesktopRadioButton->SetValue(
    237                 !fShowDisksIconRadioButton->Value() == 1);
     237                fShowDisksIconRadioButton->Value() != 1);
    238238            fMountSharedVolumesOntoDesktopCheckBox->SetEnabled(
    239239                fMountVolumesOntoDesktopRadioButton->Value() == 1);
    240240
    DesktopSettingsView::MessageReceived(BMessage* message)  
    267267        {
    268268            // Turn on and off related settings:
    269269            fShowDisksIconRadioButton->SetValue(
    270                 !fMountVolumesOntoDesktopRadioButton->Value() == 1);
     270                fMountVolumesOntoDesktopRadioButton->Value() != 1);
    271271            fMountSharedVolumesOntoDesktopCheckBox->SetEnabled(
    272272                fMountVolumesOntoDesktopRadioButton->Value() == 1);
    273273
  • src/kits/tracker/TaskLoop.cpp

    diff --git a/src/kits/tracker/TaskLoop.cpp b/src/kits/tracker/TaskLoop.cpp
    index 122f440..02ab846 100644
    a b PeriodicDelayedTask::~PeriodicDelayedTask()  
    181181bool
    182182PeriodicDelayedTask::RunIfNeeded(bigtime_t currentTime)
    183183{
    184     if (!currentTime < fRunAfter)
     184    if (currentTime >= fRunAfter)
    185185        return false;
    186186
    187187    fRunAfter = currentTime + fPeriod;