ScottishCovidResponse / SCRCIssueTracking

Central issue tracking repository for all repos in the consortium
6 stars 0 forks source link

Fix Codacy "error prone" warnings #702

Open ianhinder opened 4 years ago

ianhinder commented 4 years ago

We have 6 warnings from Codacy that might indicate errors in the code: https://app.codacy.com/gh/ScottishCovidResponse/BEEPmbp/dashboard. These should be understood and fixed if necessary.

github-actions[bot] commented 4 years ago

Heads up @chrispooley @ianhinder @rwj11 - the "BEEPmbp" label was applied to this issue.

chrispooley commented 4 years ago

These all relate to quantities which are set later. To remove these warnings I've set these quantities to UNSET.

rwj11 commented 4 years ago

It's also good practice in C++ to declare local variables as close to the first point-of-use as possible, rather than at the head of the routine. This makes it easier to ensure they are set, and aren't redundant (e.g. the "Info" issue about ntrsum being redundant).