Skip to content

Fix several warnings from GCC 16#396

Closed
gruenich wants to merge 4 commits into
GraphBLAS:v1.3.xfrom
gruenich:feature/fix-gcc-16-warnings
Closed

Fix several warnings from GCC 16#396
gruenich wants to merge 4 commits into
GraphBLAS:v1.3.xfrom
gruenich:feature/fix-gcc-16-warnings

Conversation

@gruenich

Copy link
Copy Markdown

No description provided.

Comment thread experimental/benchmark/hdip_fiedler_demo.c Outdated
Comment thread experimental/benchmark/helloworld_demo.c
LG_TRY (LAGraph_Finalize (msg)) ;
return (GrB_SUCCESS) ;
}

No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't delete this line. I use these to navigate with vim. If gcc 16 is complaining about it, then it would complain in 100s of places in my codes, and the warning should just be silenced instead.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last line had some trailing white space. I removed it, now it is similar to all the other files. Difficult to tell by the web diff.

Comment thread include/LAGraph.h Outdated
@DrTimothyAldenDavis

Copy link
Copy Markdown
Member

These changes are being made to the stable branch, but the stable branch is out of date with the latest development branch ( https://github.com/GraphBLAS/LAGraph/tree/v1.3.x ).

Found by GCC 16 (-Wpedantic).
@gruenich
gruenich force-pushed the feature/fix-gcc-16-warnings branch from 1e482a7 to 97e4a03 Compare March 26, 2026 10:09
@gruenich
gruenich changed the base branch from stable to v1.3.x March 26, 2026 10:24
Found by GCC 16 (-Wenum-int-mismatch).
Found by GCC 16 (-Wunused-variable).
Match with declaration in header.
Found by GCC 16 (-Warray-paramter).
@gruenich
gruenich force-pushed the feature/fix-gcc-16-warnings branch from 97e4a03 to 3e21558 Compare March 27, 2026 16:10
@gruenich

Copy link
Copy Markdown
Author

What is needed to get this accepted?

@DrTimothyAldenDavis

Copy link
Copy Markdown
Member

What is needed to get this accepted?

There are many many changes I have to verify, so it will take me some time to go through. Many lines of code are deleted in this PR but they shouldn't be. For example, the variables r_size, ramp_size, etc are being deleted in experimental/benchmark/FastAssign_demo.c, but they appear in the #if 0 block later on. So they should be "#if 0" commented out, not deleted.

I have to check each change like this carefully to ensure I'm not deleting something important. LAGraph has many authors and I don't always know (without looking at each file one at a time) whether or not the unused variables are important or not.

It would be easier to merge these changes in if none of these lines were deleted, just commented out instead.

@gruenich

Copy link
Copy Markdown
Author

From my experience, having wrong code and outdated code in comments is confusing, thus this PR.
I cannot ask you to invest the time to check on every change. Should I change from removing the code to comment it? Or just drop this pull request altogether?

@DrTimothyAldenDavis

Copy link
Copy Markdown
Member

The LAGraph/experimental/algorithms are works in progress, and if there is commented-out code in there, it's for a reason. Sometimes the code is scaffolding, meant for development use only. Deleting part of that scaffolding but not others would lead to a broken scaffolding.

I'd prefer to close this PR. I can work through the gcc 16 warnings myself and triage them accordingly.

@gruenich gruenich closed this Jul 23, 2026
@gruenich
gruenich deleted the feature/fix-gcc-16-warnings branch July 23, 2026 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants