Commit bfca30be authored by Jeroen Meijer's avatar Jeroen Meijer

Fix GCC warning.

parent a414f8b1
...@@ -164,7 +164,7 @@ public class LTSminPrinter { ...@@ -164,7 +164,7 @@ public class LTSminPrinter {
generateHeader(w, model); generateHeader(w, model);
generateNativeTypes(w); generateNativeTypes(w);
generateTypeDef(w, model); generateTypeDef(w, model);
generateForwardDeclarations(w); generateForwardDeclarations(w, model);
generateStateCount(w, model); generateStateCount(w, model);
generateInitialState(w, model); generateInitialState(w, model);
generateLeavesAtomic(w, model); generateLeavesAtomic(w, model);
...@@ -406,8 +406,10 @@ public class LTSminPrinter { ...@@ -406,8 +406,10 @@ public class LTSminPrinter {
w.appendLine(""); w.appendLine("");
} }
private static void generateForwardDeclarations(StringWriter w) { private static void generateForwardDeclarations(StringWriter w,LTSminModel model) {
if (model.hasAtomicCycles) {
w.appendLine("extern inline int spins_reach (void* model, transition_info_t *transition_info, state_t *in, void (*callback)(void* arg, transition_info_t *transition_info, state_t *out, int *cpy), void *arg, int pid, int *cpy);"); w.appendLine("extern inline int spins_reach (void* model, transition_info_t *transition_info, state_t *in, void (*callback)(void* arg, transition_info_t *transition_info, state_t *out, int *cpy), void *arg, int pid, int *cpy);");
}
w.appendLine("extern inline int spins_simple_reach (void* model, transition_info_t *transition_info, state_t *in, void (*callback)(void* arg, transition_info_t *transition_info, state_t *out, int *cpy), void *arg, int pid, int *cpy);"); w.appendLine("extern inline int spins_simple_reach (void* model, transition_info_t *transition_info, state_t *in, void (*callback)(void* arg, transition_info_t *transition_info, state_t *out, int *cpy), void *arg, int pid, int *cpy);");
w.appendLine("extern int spins_get_successor_all (void* model, state_t *in, void (*callback)(void* arg, transition_info_t *transition_info, state_t *out, int *cpy), void *arg);"); w.appendLine("extern int spins_get_successor_all (void* model, state_t *in, void (*callback)(void* arg, transition_info_t *transition_info, state_t *out, int *cpy), void *arg);");
w.appendLine("extern int spins_get_successor (void* model, int t, state_t *in, void (*callback)(void* arg, transition_info_t *transition_info, state_t *out, int *cpy), void *arg);"); w.appendLine("extern int spins_get_successor (void* model, int t, state_t *in, void (*callback)(void* arg, transition_info_t *transition_info, state_t *out, int *cpy), void *arg);");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment