Skip to content

Commit 1e482a7

Browse files
committed
[cleanup] Remove some unused variables
Found by GCC 16 (-Wunused-variable).
1 parent 5e04c24 commit 1e482a7

31 files changed

Lines changed: 8 additions & 48 deletions

experimental/algorithm/LAGr_MaxFlow.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,9 @@ int LAGr_MaxFlow
698698
GrB_Vector invariant = NULL ;
699699
GrB_BinaryOp CheckInvariant = NULL ;
700700
GrB_Scalar check = NULL ;
701+
#ifdef DBG
701702
bool check_raw;
703+
#endif
702704

703705
// descriptor for matrix building
704706
GrB_Descriptor desc = NULL ;

experimental/benchmark/FastAssign_demo.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,7 @@ int main (int argc, char **argv)
5050
GrB_Index *rand_a = NULL;
5151
GrB_Scalar bool1 = NULL;
5252
bool *set_a = NULL;
53-
GrB_Index r_size = 0, ramp_size = 0, junk_size = 0;
54-
bool iso = false;
5553

56-
bool *val_of_P = NULL;
5754
double t = LAGraph_WallClockTime ( ) ;
5855
GrB_Index size = (argc > 1) ? atoll(argv [1]) : 1000 ;
5956
int shift_e = 63 - (int) floor (log2 ((double) size)) ;

experimental/benchmark/Incidence_Matrix_demo.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ int main (int argc, char **argv)
5858
// mtx2bin_demo).
5959

6060
double t = LAGraph_WallClockTime ( ) ;
61-
char *matrix_name = (argc > 1) ? argv [1] : "stdin" ;
6261
LG_TRY (readproblem (
6362
&G, // the graph that is read from stdin or a file
6463
NULL, // source nodes (none, if NULL)

experimental/benchmark/SwapEdges_demo.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ int main (int argc, char **argv)
5757

5858
double t = LAGraph_WallClockTime ( ) ;
5959
GrB_Index swaps = (argc > 2) ? atoi(argv [2]): 100;
60-
char *matrix_name = (argc > 1) ? argv [1] : "stdin" ;
6160
FILE *f = (argc > 3) ? fopen (argv[3], "w"): NULL;
6261
LG_TRY (readproblem (
6362
&G, // the graph that is read from stdin or a file

experimental/benchmark/apply_demo.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ int main(int argc, char **argv)
2121
{
2222
char msg [LAGRAPH_MSG_LEN] ;
2323

24-
LAGraph_Graph G = NULL ;
2524
GrB_Matrix A = NULL ;
2625
GrB_Matrix Res = NULL ;
2726
GrB_Scalar s = NULL ;

experimental/benchmark/build_demo.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ int main (int argc, char **argv)
6969
// mtx2bin_demo).
7070

7171
double t = LAGraph_WallClockTime ( ) ;
72-
char *matrix_name = (argc > 1) ? argv [1] : "stdin" ;
7372
LG_TRY (readproblem (
7473
&G, // the graph that is read from stdin or a file
7574
NULL, // source nodes (none, if NULL)

experimental/benchmark/coarsen_matching_demo.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ int main(int argc, char **argv)
150150

151151
for (int trial = 0 ; trial < ntrials ; trial++)
152152
{
153-
int64_t seed = trial * n + 1 ;
154153
double tt = LAGraph_WallClockTime ( ) ;
155154

156155
LG_TRY (LAGraph_Coarsen_Matching (&coarsened, &parent_result, &newlabel_result, &inv_newlabel_result, G, LAGraph_Matching_heavy, 0, 1, DEFAULT_SEED, msg)) ;

experimental/benchmark/coloring_IS_demo.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ int main (int argc, char **argv)
3636
//--------------------------------------------------------------------------
3737

3838
double t = LAGraph_WallClockTime ( ) ;
39-
char *matrix_name = (argc > 1) ? argv [1] : "stdin" ;
4039
LG_TRY (readproblem (
4140
&G, // the graph that is read from stdin or a file
4241
NULL, // source nodes (none, if NULL)
@@ -58,14 +57,14 @@ int main (int argc, char **argv)
5857

5958
t = LAGraph_WallClockTime ( ) ;
6059
int status = (LAGraph_coloring_independent_set (&C, &num_colors, G, msg)) ;
60+
(void) status;
6161
alg_time = LAGraph_WallClockTime ( ) - t ;
6262
printf ("Time for IS Coloring: %g sec\n", alg_time) ;
6363

6464
//--------------------------------------------------------------------------
6565
// check the results
6666
//--------------------------------------------------------------------------
6767

68-
bool isequal ;
6968
t = LAGraph_WallClockTime ( ) ;
7069
LAGRAPH_TRY (LG_check_coloring(G, C, msg)) ;
7170
t = LAGraph_WallClockTime ( ) - t ;

experimental/benchmark/coloring_MIS_demo.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ int main (int argc, char **argv)
3636
//--------------------------------------------------------------------------
3737

3838
double t = LAGraph_WallClockTime ( ) ;
39-
char *matrix_name = (argc > 1) ? argv [1] : "stdin" ;
4039
LG_TRY (readproblem (
4140
&G, // the graph that is read from stdin or a file
4241
NULL, // source nodes (none, if NULL)
@@ -58,14 +57,14 @@ int main (int argc, char **argv)
5857

5958
t = LAGraph_WallClockTime ( ) ;
6059
int status = (LAGraph_coloring_MIS (&C, &num_colors, G, msg)) ;
60+
(void) status;
6161
alg_time = LAGraph_WallClockTime ( ) - t ;
6262
printf ("Time for MIS Coloring: %g sec\n", alg_time) ;
6363

6464
//--------------------------------------------------------------------------
6565
// check the results
6666
//--------------------------------------------------------------------------
6767

68-
bool isequal ;
6968
t = LAGraph_WallClockTime ( ) ;
7069
LAGRAPH_TRY (LG_check_coloring(G, C, msg)) ;
7170
t = LAGraph_WallClockTime ( ) - t ;

experimental/benchmark/colscale_demo.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ int main(int argc, char **argv)
1818
{
1919
char msg [LAGRAPH_MSG_LEN] ;
2020

21-
LAGraph_Graph G = NULL ;
2221
GrB_Matrix D = NULL ;
2322
GrB_Matrix A = NULL ;
2423
GrB_Matrix Res = NULL ;

0 commit comments

Comments
 (0)