aboutsummaryrefslogtreecommitdiff
path: root/Tools/CodeGen
diff options
context:
space:
mode:
authorIan Hinder <ian.hinder@aei.mpg.de>2012-11-21 18:16:19 +0100
committerIan Hinder <ian.hinder@aei.mpg.de>2012-11-21 18:16:19 +0100
commit9d2954eaab73769f6814b4ca050b9a0bf9411548 (patch)
tree6e41eed9f0ceaca2186fee055588619d49406d49 /Tools/CodeGen
parente2d5691840a25800f77b970768e495cbfeb6d21c (diff)
Thorn.m: Eliminate some code in the case that no symmetries need to be registered
This avoids a compiler warning about an unused variable
Diffstat (limited to 'Tools/CodeGen')
-rw-r--r--Tools/CodeGen/Thorn.m4
1 files changed, 3 insertions, 1 deletions
diff --git a/Tools/CodeGen/Thorn.m b/Tools/CodeGen/Thorn.m
index 74259c4..a86d969 100644
--- a/Tools/CodeGen/Thorn.m
+++ b/Tools/CodeGen/Thorn.m
@@ -679,13 +679,15 @@ CreateSymmetriesRegistrationSource[thornName_, implementationName_, GFs_, reflec
{"cctk.h", "cctk_Arguments.h", "cctk_Parameters.h", "Symmetry.h"}],
DefineCCTKFunction[ thornName <> "_RegisterSymmetries", "void",
+ If[Length[spec] > 0,
{CommentedBlock["array holding symmetry definitions",
"CCTK_INT sym[3];\n\n"],
CommentedBlock["Register symmetries of grid functions",
- Map[SymmetriesBlock, spec]]}
+ Map[SymmetriesBlock, spec]]},
+ {}]
]
};