Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce warnings nrncvode #3158

Open
wants to merge 2 commits into
base: cornu/reduce_warnings
Choose a base branch
from

Conversation

alkino
Copy link
Member

@alkino alkino commented Oct 30, 2024

No description provided.

@bbpbuildbot

This comment has been minimized.

@@ -3065,8 +3064,7 @@ void PreSyn::deliver(double tt, NetCvode* ns, NrnThread* nt) {
TQItem* q = ns->p[i].tq_->least();
Cvode* cv = (Cvode*) q->data_;
if (tt < cv->t_) {
int err = NVI_SUCCESS;
err = cv->handle_step(nrn_ensure_model_data_are_sorted(), ns, tt);
cv->handle_step(nrn_ensure_model_data_are_sorted(), ns, tt);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should write an error message here. Is anyone able to tell me what we should write?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem like something a user could do anything about if they encountered it. Therefore, something semi generic would be sufficient?

"warning: cv->handle_step failed with err = {err}"

Not sure it fits the theme of removing unused variables.

Copy link

sonarcloud bot commented Oct 30, 2024

Copy link

✔️ 31bfffc -> Azure artifacts URL

@@ -3065,8 +3064,7 @@ void PreSyn::deliver(double tt, NetCvode* ns, NrnThread* nt) {
TQItem* q = ns->p[i].tq_->least();
Cvode* cv = (Cvode*) q->data_;
if (tt < cv->t_) {
int err = NVI_SUCCESS;
err = cv->handle_step(nrn_ensure_model_data_are_sorted(), ns, tt);
cv->handle_step(nrn_ensure_model_data_are_sorted(), ns, tt);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem like something a user could do anything about if they encountered it. Therefore, something semi generic would be sufficient?

"warning: cv->handle_step failed with err = {err}"

Not sure it fits the theme of removing unused variables.

Comment on lines +484 to +485
static int res_ = 0;
++res_;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't it still unused?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants