Skip to content

Commit 1bb72b2

Browse files
committed
Only initialize unused variables to prevent GCC warnings.
1 parent a8a00bb commit 1bb72b2

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

kernel/riscv64/sgemm_kernel_16x8_zvl256b.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,6 +1312,8 @@ static FORCEINLINE FLOAT* M_TAIL_ONE(BLASLONG K, const BLASLONG M, const BLASLON
13121312
return B;
13131313
}
13141314

1315+
#define GCC_COMPILER (defined(__GNUC__) && !defined(__clang__))
1316+
13151317
static FORCEINLINE FLOAT* M_TAIL(BLASLONG K, const BLASLONG M, const BLASLONG N, const bool S, FLOAT alpha, FLOAT* A0, FLOAT* B, FLOAT* C, BLASLONG ldc)
13161318
{
13171319
FLOAT *A1, *A2, *A3;
@@ -1321,23 +1323,29 @@ static FORCEINLINE FLOAT* M_TAIL(BLASLONG K, const BLASLONG M, const BLASLONG N,
13211323
} else
13221324
#endif
13231325
{
1326+
#ifdef GCC_COMPILER
13241327
A1 = A0;
1328+
#endif
13251329
}
13261330
#ifndef GEMM_NEW_PACKING
13271331
if (M & 2) {
13281332
A2 = A0 + (K * (M & 0xC));
13291333
} else
13301334
#endif
13311335
{
1336+
#ifdef GCC_COMPILER
13321337
A2 = A0;
1338+
#endif
13331339
}
13341340
#ifndef GEMM_NEW_PACKING
13351341
if (M & 1) {
13361342
A3 = A0 + (K * (M & 0xE));
13371343
} else
13381344
#endif
13391345
{
1346+
#ifdef GCC_COMPILER
13401347
A3 = A0;
1348+
#endif
13411349
}
13421350
if (M & 8) {
13431351
if (M & 4) {

0 commit comments

Comments
 (0)