From e13c94ed4f26c13cf2be74361a80826c8a33e82c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer <akohlmey@gmail.com> Date: Tue, 20 Jun 2017 17:25:01 -0400 Subject: [PATCH] fix uninitialized variable bug spotted by coverity scan --- src/USER-TALLY/compute_heat_flux_tally.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/USER-TALLY/compute_heat_flux_tally.cpp b/src/USER-TALLY/compute_heat_flux_tally.cpp index 65f57b7678..b366b92be3 100644 --- a/src/USER-TALLY/compute_heat_flux_tally.cpp +++ b/src/USER-TALLY/compute_heat_flux_tally.cpp @@ -246,7 +246,7 @@ void ComputeHeatFluxTally::compute_vector() double ke_i; if (rmass) ke_i = pfactor * rmass[i]; - else ke_i *= pfactor * mass[type[i]]; + else ke_i = pfactor * mass[type[i]]; ke_i *= (vi[0]*vi[0] + vi[1]*vi[1] + vi[2]*vi[2]); ke_i += eatom[i]; -- GitLab