Skip to content

Compiler warns about initializing reference with temporary in astrocyte_lr_1994 #3137

@heplesser

Description

@heplesser

The newest AppleClang (15.0.0.15000309) warns about assigning the result of a temporary expression evaluation result to a reference:

// shorthand for state variables
const double& ip3 = y[ S::IP3 ];
// Ca_tot_ corresponds to the c_0 (total [Ca++] in terms of cytosolic vol)
// in De Young & Keizer (1992) and Li & Rinzel (1994)
const double& calc = std::max( 0.0, std::min( y[ S::Ca_astro ], node.P_.Ca_tot_ ) ); // keep calcium within limits
const double& h_ip3r = y[ S::h_IP3R ];

conc should be a proper variable. The two references above and below are fine, since they point to vector elements.

Metadata

Metadata

Assignees

No one assigned

    Labels

    I: No breaking changePreviously written code will work as before, no one should note anything changing (aside the fix)S: HighShould be handled nextT: BugWrong statements in the code or documentation

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions