From 068437736b41d51a1f5ec47839f059bf58a20413 Mon Sep 17 00:00:00 2001 From: "Field G. Van Zee" Date: Mon, 9 Sep 2013 14:07:58 -0500 Subject: [PATCH] Fixed set-but-not-used compiler (gcc) warnings. 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. --- frame/2/her/bli_her_unb_var1.c | 3 +++ frame/2/her/bli_her_unb_var2.c | 3 +++ frame/2/her2/bli_her2_unb_var2.c | 3 +++ frame/2/her2/bli_her2_unb_var3.c | 3 +++ frame/2/her2/bli_her2_unb_var4.c | 4 ++++ frame/2/her2/bli_her2_unf_var4.c | 4 ++++ frame/3/her2k/bli_her2k.c | 4 ++-- frame/util/mkherm/bli_mkherm_unb_var1.c | 3 +++ 8 files changed, 25 insertions(+), 2 deletions(-) diff --git a/frame/2/her/bli_her_unb_var1.c b/frame/2/her/bli_her_unb_var1.c index 7f1998d99b..602b6b23b5 100644 --- a/frame/2/her/bli_her_unb_var1.c +++ b/frame/2/her/bli_her_unb_var1.c @@ -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; \ \ diff --git a/frame/2/her/bli_her_unb_var2.c b/frame/2/her/bli_her_unb_var2.c index 23c9b7aa30..12ef7c10b2 100644 --- a/frame/2/her/bli_her_unb_var2.c +++ b/frame/2/her/bli_her_unb_var2.c @@ -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; \ \ diff --git a/frame/2/her2/bli_her2_unb_var2.c b/frame/2/her2/bli_her2_unb_var2.c index 10a5dc30cd..e08e15e00d 100644 --- a/frame/2/her2/bli_her2_unb_var2.c +++ b/frame/2/her2/bli_her2_unb_var2.c @@ -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; \ \ diff --git a/frame/2/her2/bli_her2_unb_var3.c b/frame/2/her2/bli_her2_unb_var3.c index 34e320740f..d514627570 100644 --- a/frame/2/her2/bli_her2_unb_var3.c +++ b/frame/2/her2/bli_her2_unb_var3.c @@ -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; \ \ diff --git a/frame/2/her2/bli_her2_unb_var4.c b/frame/2/her2/bli_her2_unb_var4.c index 03503fc75a..024387e0f4 100644 --- a/frame/2/her2/bli_her2_unb_var4.c +++ b/frame/2/her2/bli_her2_unb_var4.c @@ -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; \ \ diff --git a/frame/2/her2/bli_her2_unf_var4.c b/frame/2/her2/bli_her2_unf_var4.c index e8416fae4a..6437816ec3 100644 --- a/frame/2/her2/bli_her2_unf_var4.c +++ b/frame/2/her2/bli_her2_unf_var4.c @@ -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; \ \ diff --git a/frame/3/her2k/bli_her2k.c b/frame/3/her2k/bli_her2k.c index bca1351f4b..cf70f396b7 100644 --- a/frame/3/her2k/bli_her2k.c +++ b/frame/3/her2k/bli_her2k.c @@ -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; @@ -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, diff --git a/frame/util/mkherm/bli_mkherm_unb_var1.c b/frame/util/mkherm/bli_mkherm_unb_var1.c index d0c5e8ebb5..e6243f80e6 100644 --- a/frame/util/mkherm/bli_mkherm_unb_var1.c +++ b/frame/util/mkherm/bli_mkherm_unb_var1.c @@ -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; \