From 682c247e006b25618edb819df3621661ec5c7ae1 Mon Sep 17 00:00:00 2001
From: mattijs <mattijs@hunt.opencfd.co.uk>
Date: Mon, 13 Oct 2008 09:33:36 +0100
Subject: [PATCH] gcc 4.2.1 compiler warning

---
 .../miscellaneous/postChannel/channelIndexTemplates.C         | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndexTemplates.C b/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndexTemplates.C
index 9fc8ff03609..6f7e548c70a 100644
--- a/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndexTemplates.C
+++ b/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndexTemplates.C
@@ -54,9 +54,11 @@ Foam::Field<T> Foam::channelIndex::collapse
 ) const
 {
     // Average and order
+    const Field<T> summedField(regionSum(cellField));
+
     Field<T> regionField
     (
-        regionSum(cellField)
+        summedField
       / regionCount_,
         sortMap_
     );
-- 
GitLab