Skip to content

Fix gcc warnings

Anton Mitrofanov requested to merge BugMaster/x264:fix_gcc_warnings into master
common/deblock.c: In function 'x264_8_macroblock_deblock':
common/deblock.c:657:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
  657 |     if( !transform_8x8 ) FILTER( 0, 1 );
      |     ^~
common/deblock.c:641:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
  641 |     do\
      |     ^~~
  642 |     {\
      |      
common/deblock.c:641:5: note: in definition of macro 'FILTER'
  641 |     do\
      |     ^~~
  642 |     {\
      |      
common/deblock.c:661:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
  661 |     if( !transform_8x8 ) FILTER( 1, 1 );
      |     ^~
common/deblock.c:641:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
  641 |     do\
      |     ^~~
  642 |     {\
      |      
common/deblock.c:641:5: note: in definition of macro 'FILTER'
  641 |     do\
      |     ^~~
  642 |     {\
      |      
common/mvpred.c:519:77: warning: argument 4 of type 'int16_t[9][2]' {aka 'short int[9][2]'} with mismatched bound [-Warray-parameter=]
  519 | void x264_mb_predict_mv_ref16x16( x264_t *h, int i_list, int i_ref, int16_t mvc[9][2], int *i_mvc )
      |                                                                     ~~~~~~~~^~~~~~~~~
In file included from common/common.h:772,
                 from common/mvpred.c:28:
common/macroblock.h:364:77: note: previously declared as 'int16_t[8][2]' {aka 'short int[8][2]'}
  364 | void x264_mb_predict_mv_ref16x16( x264_t *h, int i_list, int i_ref, int16_t mvc[8][2], int *i_mvc );
      |                                                                     ~~~~~~~~^~~~~~~~~
encoder/set.c:868: warning: "ERROR" redefined
  868 | #define ERROR(...)\
      | 
In file included from c:\mingw_gcc\i686-w64-mingw32\include\windows.h:71,
                 from ./common/osdep.h:48,
                 from ./common/base.h:43,
                 from ./common/common.h:30,
                 from encoder/set.c:27:
c:\mingw_gcc\i686-w64-mingw32\include\wingdi.h:75: note: this is the location of the previous definition
   75 | #define ERROR 0
      | 

Merge request reports