Cleanup compiler warnings: unused variables/typedefs, uninitialised vars, etc.#2933
Cleanup compiler warnings: unused variables/typedefs, uninitialised vars, etc.#2933
Conversation
| * | ||
| */ | ||
| static void grad() { | ||
| static inline void grad() { |
There was a problem hiding this comment.
This and the similar change in set_zero_all_adjoints_nested seem like they're different from the rest of the changes here - why do these functions become inline?
There was a problem hiding this comment.
Static functions that aren't used in a given translation unit give an 'unused-function' warning, but this is suppressed if the static function is declared inline: https://sourceware.org/legacy-ml/gdb/2015-02/msg00064.html
These are small enough functions that I think inlining is fine imo
|
The latest set of changes seem good to me, I'd appreciate someone like @SteveBronder or @syclik giving it a once over before merging to make sure I'm not missing anything |
|
@andrjohns THANK YOU!!! @WardBrian, thanks for reviewing! |
Summary
Cleans up the following compiler warnings:
Tests
No new tests, existing tests should pass
Side Effects
N/A
Release notes
Cleans up several compiler warnings throughout Math library and tests
Checklist
Math issue #(issue number)
Copyright holder: Andrew Johnson
The copyright holder is typically you or your assignee, such as a university or company. By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses:
- Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
- Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
the basic tests are passing
./runTests.py test/unit)make test-headers)make test-math-dependencies)make doxygen)make cpplint)the code is written in idiomatic C++ and changes are documented in the doxygen
the new changes are tested