Opened 11 years ago Closed 11 years ago #1216 closed defect (fixed)Changes to TComSlice.h required in order to compile with GCC 4.8.1
Description
Minor Bug
Changes to TComSlice.h required in order to compile with GCC 4.8.1
When compiling with GCC 4.8.1 TComSlice.h is flagged up multiple times with a single compiler error ("array subscript is above array bounds").
In effect, the compiler does not like it that tLayer (or tlayer is is called elsewhere) is assumed to be valid, it could be abused and thus unsafe.
To resolve this fear, test tLayer against getMaxTLayers to decide if it is safe prior to accepting or reverting to the maximum possible value. e.g.
m_numReorderPics[(tLayer = tLayer > getMaxTLayers ()? getMaxTLayers () : tLayer)] = v;
Making the following modifications will suppress these errors and the codebase will compile.
-------------
To
Change from
Change from
To
-------------
-------------
To
Change from
To
------------- Change History (3)comment:1 Changed 11 years ago by DefaultCC Plugin
comment:2 Changed 11 years ago by fbossencomment:3 Changed 11 years ago by fbossen
Note: See
TracTickets for help on using
tickets. | This list contains all users that will be notified about changes made to this ticket. These roles will be notified: Reporter, Owner, Subscriber, Participant
|
Fixed in r3760