Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2015-07-05 14:18:06 +0000
committerHenrik Rentz-Reichert2015-07-05 14:18:06 +0000
commitc1b9ca1eda69114640c54b05bf8988ea686e765d (patch)
tree3e31f1e907f693d5fbce24bb1469ba730db81eb7 /plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c
parent8ac4564d7f2c915e9d164820313055f0242b654c (diff)
downloadorg.eclipse.etrice-c1b9ca1eda69114640c54b05bf8988ea686e765d.tar.gz
org.eclipse.etrice-c1b9ca1eda69114640c54b05bf8988ea686e765d.tar.xz
org.eclipse.etrice-c1b9ca1eda69114640c54b05bf8988ea686e765d.zip
[generator.fsm, generator.c, genmodel.fsm] avoid warnings in generated code
Diffstat (limited to 'plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c')
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/Initialization.xtend2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/Initialization.xtend b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/Initialization.xtend
index 49c9edc77..31b8403ba 100644
--- a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/Initialization.xtend
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/Initialization.xtend
@@ -79,6 +79,8 @@ class Initialization {
var value = getPrimitiveValue(instance, path)
if(a.size > 0 && !aType.characterType && !value.trim.startsWith('{'))
'''{«FOR Integer i:1..a.size SEPARATOR ', '»«value»«ENDFOR»}'''
+ else if (a.size > 0 && aType.characterType && value.startsWith("'"))
+ "{"+value+"}"
else
value
}

Back to the top