Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Need to bug PostgreSQL core about spi.h
Has a bunch of unused parameters in it that need annotation to compile without warnings.
- Loading branch information
12c8ef2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, I think unused argument warnings are a really bad idea. It can be quite reasonable to add parameters that are currently unused when writing an API. And the other way round, when removing the need for a parameter in a widely used API, it's often not required to break existing users.
12c8ef2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've had so few warnings for so long that I turned on
-Werror
recently, so this is more than avoiding an unused argument warning. It will fail the build.At any rate, you can still have unused arguments, they just must be annotated as such with
__attribute__((unused))
or whatnot.What would you suggest: should I turn off unused argument warnings altogether (and if so, should I also turn off unused declaration warnings)? They do have a habit of catching variables or arguments I've written during development but ended up not needing later.
12c8ef2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
12c8ef2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume you mean
-Wno-unused-parameter
. I pushed a change up as #122 and will merge it shortly. I'll rebase #121 on it so I don't need the__attribute__
s in that change set.