Silence an unused variable warning with a cast
authorMartin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Tue, 14 Nov 2017 22:23:44 +0000 (23:23 +0100)
committerGitHub <noreply@github.com>
Tue, 14 Nov 2017 22:23:44 +0000 (23:23 +0100)
l2 cache size is not universally needed to assign default unrolling limits, but neither putting its declaration inside an ifdef nor cloning it into all ifdef sections that need it really makes sense here.

kernel/setparam-ref.c

index 9320cb5..b6c5b54 100644 (file)
@@ -684,6 +684,9 @@ static void init_parameter(void) {
 
   int l2 = get_l2_size();
 
+  (void) l2; /* dirty trick to suppress unused variable warning for targets */
+             /* where the GEMM unrolling parameters do not depend on l2 */
+  
   TABLE_NAME.sgemm_q = SGEMM_DEFAULT_Q;
   TABLE_NAME.dgemm_q = DGEMM_DEFAULT_Q;
   TABLE_NAME.cgemm_q = CGEMM_DEFAULT_Q;