Skip to content

Commit

Permalink
Fixed set-but-not-used compiler (gcc) warnings.
Browse files Browse the repository at this point in the history
Details:
- Used void-casts of certain variables to appease gcc (and perhaps other
  compilers) when such variables are only used in the complex instances of
  the functions. Special thanks to Karl Rupp for suggesting a portable fix
  for these warnings.
  • Loading branch information
fgvanzee committed Sep 9, 2013
1 parent 6dc85f6 commit 0684377
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 2 deletions.
3 changes: 3 additions & 0 deletions frame/2/her/bli_her_unb_var1.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ void PASTEMAC2(chx,chc,varname)( \
dim_t n_behind; \
inc_t rs_ct, cs_ct; \
conj_t conj0, conj1; \
\
/* Eliminate unused variable warnings. */ \
( void )conj0; \
\
if ( bli_zero_dim1( m ) ) return; \
\
Expand Down
3 changes: 3 additions & 0 deletions frame/2/her/bli_her_unb_var2.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ void PASTEMAC2(chx,chc,varname)( \
dim_t n_ahead; \
inc_t rs_ct, cs_ct; \
conj_t conj0, conj1; \
\
/* Eliminate unused variable warnings. */ \
( void )conj0; \
\
if ( bli_zero_dim1( m ) ) return; \
\
Expand Down
3 changes: 3 additions & 0 deletions frame/2/her2/bli_her2_unb_var2.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ void PASTEMAC3(chx,chy,chc,varname)( \
inc_t rs_ct, cs_ct; \
conj_t conj0, conj1; \
conj_t conjh_conjy; \
\
/* Eliminate unused variable warnings. */ \
( void )conjh_conjy; \
\
if ( bli_zero_dim1( m ) ) return; \
\
Expand Down
3 changes: 3 additions & 0 deletions frame/2/her2/bli_her2_unb_var3.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ void PASTEMAC3(chx,chy,chc,varname)( \
inc_t rs_ct, cs_ct; \
conj_t conj0, conj1; \
conj_t conjh_conjx; \
\
/* Eliminate unused variable warnings. */ \
( void )conjh_conjx; \
\
if ( bli_zero_dim1( m ) ) return; \
\
Expand Down
4 changes: 4 additions & 0 deletions frame/2/her2/bli_her2_unb_var4.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ void PASTEMAC3(chx,chy,chc,varname)( \
conj_t conj0, conj1; \
conj_t conjh_conjx; \
conj_t conjh_conjy; \
\
/* Eliminate unused variable warnings. */ \
( void )conjh_conjx; \
( void )conjh_conjy; \
\
if ( bli_zero_dim1( m ) ) return; \
\
Expand Down
4 changes: 4 additions & 0 deletions frame/2/her2/bli_her2_unf_var4.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ void PASTEMAC3(chx,chy,chc,varname)( \
conj_t conj0, conj1; \
conj_t conjh_conjx; \
conj_t conjh_conjy; \
\
/* Eliminate unused variable warnings. */ \
( void )conjh_conjx; \
( void )conjh_conjy; \
\
if ( bli_zero_dim1( m ) ) return; \
\
Expand Down
4 changes: 2 additions & 2 deletions frame/3/her2k/bli_her2k.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void bli_her2k( obj_t* alpha,
obj_t* beta,
obj_t* c )
{
her2k_t* cntl;
//her2k_t* cntl;
obj_t alpha_local;
obj_t alpha_conj_local;
obj_t beta_local;
Expand Down Expand Up @@ -133,10 +133,10 @@ void bli_her2k( obj_t* alpha,

if ( pack_c ) bli_check_error_code( BLIS_NOT_YET_IMPLEMENTED );

/*
// Choose the control tree.
cntl = her2k_cntl;
/*
// Invoke the internal back-end.
bli_her2k_int( &alpha_local,
&a_local,
Expand Down
3 changes: 3 additions & 0 deletions frame/util/mkherm/bli_mkherm_unb_var1.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ void PASTEMAC(ch,varname)( \
ctype* alpha11; \
doff_t diagoffa; \
dim_t i; \
\
/* Eliminate unused variable warnings. */ \
( void )alpha11; \
\
/* If the dimension is zero, return early. */ \
if ( bli_zero_dim1( m ) ) return; \
Expand Down

0 comments on commit 0684377

Please sign in to comment.