Opened 9 years ago

Closed 8 years ago

#12747 closed bug (fixed)

[Patch] InfoWindow.cpp: fix gcc6 build

Reported by: mt Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: Kits/libtracker.so Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

Gcc6 warns '-Werror=misleading-indentation' in BInfoWindow::MessageReceived() and AttributeView::MouseDown(), so add curly braces to fix it. and I think we don't need ";" after if() at line 453 and line 1258.

C++ /home/haiku/haiku/haiku/generated-gcc6/objects/haiku/x86/release/kits/tracker/InfoWindow.o 
/home/haiku/haiku/haiku/src/kits/tracker/InfoWindow.cpp: In member function 'virtual void BPrivate::BInfoWindow::MessageReceived(BMessage*)':
/home/haiku/haiku/haiku/src/kits/tracker/InfoWindow.cpp:444:4: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
    if (!fModel->HasLocalizedName()
    ^~
/home/haiku/haiku/haiku/src/kits/tracker/InfoWindow.cpp:454:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
     fAttributeView->BeginEditingTitle();
     ^~~~~~~~~~~~~~
/home/haiku/haiku/haiku/src/kits/tracker/InfoWindow.cpp: In member function 'virtual void BPrivate::AttributeView::MouseDown(BPoint)':
/home/haiku/haiku/haiku/src/kits/tracker/InfoWindow.cpp:1248:3: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
   if (!fModel->HasLocalizedName()
   ^~
/home/haiku/haiku/haiku/src/kits/tracker/InfoWindow.cpp:1259:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
    BeginEditingTitle();
    ^~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

Attachments (1)

0005-InfoWindow.cpp-fix-gcc6-build.patch (1.3 KB ) - added by mt 9 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 by mt, 9 years ago

patch: 01

comment:2 by pulkomandy, 8 years ago

Resolution: fixed
Status: newclosed

Fixed in hrev50503.

Note: See TracTickets for help on using tickets.