Opened 9 years ago

Closed 9 years ago

#12767 closed bug (fixed)

[Patch] ringqueue.cpp: fix gcc6 build

Reported by: mt Owned by: kallisti5
Priority: normal Milestone: Unscheduled
Component: Drivers/Graphics/radeon_hd Version: R1/Development
Keywords: accelerants/radeon_hd Cc:
Blocked By: Blocking:
Platform: All

Description

In compute_order(), gcc6 warns '-Werror=misleading-indentation', but I think if() at line 40 is not in for() block. So I separate for() and if().

C++ /home/haiku/haiku/haiku/generated-gcc6/objects/haiku/x86/release/add-ons/accelerants/radeon_hd/ringqueue.o 
/home/haiku/haiku/haiku/src/add-ons/accelerants/radeon_hd/ringqueue.cpp: In function 'int compute_order(long unsigned int)':
/home/haiku/haiku/haiku/src/add-ons/accelerants/radeon_hd/ringqueue.cpp:39:2: error: this 'for' clause does not guard... [-Werror=misleading-indentation]
  for (order = 0, tmp = size; tmp >>= 1; ++order);
  ^~~
/home/haiku/haiku/haiku/src/add-ons/accelerants/radeon_hd/ringqueue.cpp:40:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
   if (size & ~(1 << order))
   ^~
cc1plus: all warnings being treated as errors

Attachments (1)

0019-ringqueue.cpp-fix-gcc6-build.patch (843 bytes ) - added by mt 9 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 by mt, 9 years ago

patch: 01

comment:2 by korli, 9 years ago

+1

comment:3 by kallisti5, 9 years ago

Resolution: fixed
Status: newclosed

Pushed in hrev50301 Thanks for the patch!

Note: See TracTickets for help on using tickets.