chore: Warn about unused return values #125
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This can be quite useful to detect places in your code where you aren't checking for errors, but it can also be quite annoying.
There are some functions where this is perfectly reasonable, like
oamAllocateGfx()
, whose only purpose is to return an address.In other cases it's a bit less clear, like
glTexImage2D()
. In this case, the function can fail if there isn't enough VRAM left for your texture, and you should definitely check for that, but this will cause many warnings in code ported from old libnds versions (and it would make it harder to have code that works with devkitARM and BlocksDS).This PR is just to get feedback, for now. I will definitely apply the changes to functions like
oamAllocateGfx()
but I want to know how people feel about the rest.