nimble-dev / nimble

The base NIMBLE package for R
http://R-nimble.org
BSD 3-Clause "New" or "Revised" License
160 stars 24 forks source link

cleanup unused variable and typedef warnings #1408

Closed perrydv closed 10 months ago

perrydv commented 10 months ago

This has changes to clean up C++ output that gives warnings about variables initialized but unused. These come from harmless bits of unnecessary code from code like x[,1]. Fixes #1399.

This also introduces a way to remove the warnings about unused typedefs. We hadn't done this before because it is a bit of a pain when creating the C++ code to see how to do that. But instead I post-processed the final result based on text processing to identify if a typedef is not used and then remove it. I also added a nimbleOption to toggle this, so that if it causes problems we can turn it off.

Let's see what testing shows.

perrydv commented 10 months ago

@paciorek The test failure here is in test-car. I can't reproduce it on my machine, so I'm stuck. It is not at first glance obviously related to changes on this branch. Are you able to reproduce it?

paciorek commented 10 months ago

Sorry failure was a CAR hiccup I had fixed on devel but not pushed. I am rerunning the failed test set.

paciorek commented 10 months ago

Easiest path forward is just to merge. I think devel is fine, but having trouble rerunning tests such that they recognize that.