Commit a6b95836 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

[lbtt]

Kill some warnings on Ubuntu.

* src/UserCommandReader.cc (UserCommandInterface): Explicitly
ignore the return code of system() to kill a warning.
* src/TestOperations.cc (generateBuchiAutomaton): Explicitly
ignore the return code of write() to kill a warning.
parent e20ba143
2010-01-21 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Kill some warnings on Ubuntu.
* src/UserCommandReader.cc (UserCommandInterface): Explicitly
ignore the return code of system() to kill a warning.
* src/TestOperations.cc (generateBuchiAutomaton): Explicitly
ignore the return code of write() to kill a warning.
2010-01-16 Guillaume Sadegh <sadegh@lrde.epita.fr> 2010-01-16 Guillaume Sadegh <sadegh@lrde.epita.fr>
Add a missing include. Add a missing include.
......
...@@ -288,7 +288,7 @@ void printFileContents ...@@ -288,7 +288,7 @@ void printFileContents
first_line_printed = true; first_line_printed = true;
estream << string(indent, ' ') + message + '\n'; estream << string(indent, ' ') + message + '\n';
} }
estream << string(indent, ' ') + line_prefix + message_line + '\n'; estream << string(indent, ' ') + line_prefix + message_line + '\n';
} }
} }
...@@ -400,7 +400,7 @@ void generateStateSpace() ...@@ -400,7 +400,7 @@ void generateStateSpace()
2, 2,
6); 6);
} }
else else
{ {
current_size = configuration.statespace_generator.min_size; current_size = configuration.statespace_generator.min_size;
printText("[All state spaces have been enumerated. Staring over]\n", printText("[All state spaces have been enumerated. Staring over]\n",
...@@ -488,7 +488,7 @@ void generateStateSpace() ...@@ -488,7 +488,7 @@ void generateStateSpace()
printText(" ok\n", 4); printText(" ok\n", 4);
if (configuration.statespace_generator.max_size if (configuration.statespace_generator.max_size
> configuration.statespace_generator.min_size) > configuration.statespace_generator.min_size)
printText("number of states: " printText("number of states: "
+ toString(round_info.statespace->size()) + toString(round_info.statespace->size())
...@@ -653,7 +653,7 @@ void generateFormulae(istream* formula_input_stream) ...@@ -653,7 +653,7 @@ void generateFormulae(istream* formula_input_stream)
if (printText(" ok\n", 4)) if (printText(" ok\n", 4))
printText("<negating formula>", 4, 6); printText("<negating formula>", 4, 6);
round_info.formulae[3] = &(::Ltl::Not::construct(*round_info.formulae[2])); round_info.formulae[3] = &(::Ltl::Not::construct(*round_info.formulae[2]));
if (printText(" ok\n", 4)) if (printText(" ok\n", 4))
...@@ -941,8 +941,8 @@ void generateBuchiAutomaton ...@@ -941,8 +941,8 @@ void generateBuchiAutomaton
/* setsid, dup2 or exec failed: write the value of errno to /* setsid, dup2 or exec failed: write the value of errno to
* error_pipe */ * error_pipe */
write(error_pipe[1], static_cast<const void*>(&errno), (void) write(error_pipe[1], static_cast<const void*>(&errno),
sizeof(int)); sizeof(int));
close(error_pipe[1]); close(error_pipe[1]);
exit(0); exit(0);
...@@ -1027,7 +1027,7 @@ void generateBuchiAutomaton ...@@ -1027,7 +1027,7 @@ void generateBuchiAutomaton
times(&timing_information_end); times(&timing_information_end);
translator_process = 0; translator_process = 0;
/* /*
* If there is something to be read from error_pipe, then there * If there is something to be read from error_pipe, then there
* was an error in replacing the child process with the external * was an error in replacing the child process with the external
* program (and the pipe contains the value of errno in this * program (and the pipe contains the value of errno in this
...@@ -1199,7 +1199,7 @@ void generateBuchiAutomaton ...@@ -1199,7 +1199,7 @@ void generateBuchiAutomaton
printText("[User break]", 1, printText("[User break]", 1,
configuration.global_options.verbosity <= 2 ? 0 : 10); configuration.global_options.verbosity <= 2 ? 0 : 10);
printText("\n\n", 1); printText("\n\n", 1);
if (round_info.transcript_file.is_open()) if (round_info.transcript_file.is_open())
writeToTranscript("User break while generating Büchi automaton (" writeToTranscript("User break while generating Büchi automaton ("
+ configuration.algorithmString(algorithm_id) + configuration.algorithmString(algorithm_id)
...@@ -1347,7 +1347,7 @@ void generateBuchiAutomaton ...@@ -1347,7 +1347,7 @@ void generateBuchiAutomaton
+= automaton_stats.number_of_buchi_transitions; += automaton_stats.number_of_buchi_transitions;
final_statistics[algorithm_id].total_number_of_acceptance_sets[f] final_statistics[algorithm_id].total_number_of_acceptance_sets[f]
+= automaton_stats.number_of_acceptance_sets; += automaton_stats.number_of_acceptance_sets;
if (final_statistics[algorithm_id].total_buchi_generation_time[f] < 0.0 if (final_statistics[algorithm_id].total_buchi_generation_time[f] < 0.0
|| automaton_stats.buchi_generation_time < 0.0) || automaton_stats.buchi_generation_time < 0.0)
final_statistics[algorithm_id].total_buchi_generation_time[f] = -1.0; final_statistics[algorithm_id].total_buchi_generation_time[f] = -1.0;
...@@ -1415,10 +1415,10 @@ void performEmptinessCheck ...@@ -1415,10 +1415,10 @@ void performEmptinessCheck
product_stats = product.globalEmptinessCheck product_stats = product.globalEmptinessCheck
(automaton_stats.buchi_automaton->initialState(), (automaton_stats.buchi_automaton->initialState(),
automaton_stats.emptiness_check_result, automaton_stats.emptiness_check_result,
round_info.real_emptiness_check_size); round_info.real_emptiness_check_size);
printText(" ok\n", 4); printText(" ok\n", 4);
automaton_stats.number_of_product_states = product_stats.first; automaton_stats.number_of_product_states = product_stats.first;
automaton_stats.number_of_product_transitions = product_stats.second; automaton_stats.number_of_product_transitions = product_stats.second;
...@@ -1450,7 +1450,7 @@ void performEmptinessCheck ...@@ -1450,7 +1450,7 @@ void performEmptinessCheck
printText("[User break]", 1, printText("[User break]", 1,
configuration.global_options.verbosity <= 2 ? 0 : 10); configuration.global_options.verbosity <= 2 ? 0 : 10);
printText("\n\n", 1); printText("\n\n", 1);
if (round_info.transcript_file.is_open()) if (round_info.transcript_file.is_open())
writeToTranscript("User break while generating product automaton (" writeToTranscript("User break while generating product automaton ("
+ configuration.algorithmString(algorithm_id) + configuration.algorithmString(algorithm_id)
...@@ -1558,10 +1558,10 @@ void performConsistencyCheck ...@@ -1558,10 +1558,10 @@ void performConsistencyCheck
} }
printText((result ? " ok\n" : " failed\n"), 4); printText((result ? " ok\n" : " failed\n"), 4);
if (configuration.global_options.verbosity >= 2) if (configuration.global_options.verbosity >= 2)
printConsistencyCheckStats(cout, 8, algorithm_id); printConsistencyCheckStats(cout, 8, algorithm_id);
} }
/* ========================================================================= */ /* ========================================================================= */
void compareResults() void compareResults()
......
...@@ -207,7 +207,7 @@ void executeUserCommands() ...@@ -207,7 +207,7 @@ void executeUserCommands()
round_info.cout << '\n'; round_info.cout << '\n';
round_info.cout.flush(); round_info.cout.flush();
} }
if (!input_tokens.empty()) if (!input_tokens.empty())
{ {
token = parseCommand(input_tokens[0]); token = parseCommand(input_tokens[0]);
...@@ -221,7 +221,7 @@ void executeUserCommands() ...@@ -221,7 +221,7 @@ void executeUserCommands()
rounds_to_continue = (input_tokens.size() > 1 rounds_to_continue = (input_tokens.size() > 1
? parseNumber(input_tokens[1]) ? parseNumber(input_tokens[1])
: 1); : 1);
if (rounds_to_continue == 0) if (rounds_to_continue == 0)
throw CommandErrorException("Argument of the command must be " throw CommandErrorException("Argument of the command must be "
"positive."); "positive.");
...@@ -320,7 +320,7 @@ void executeUserCommands() ...@@ -320,7 +320,7 @@ void executeUserCommands()
"the current test round was skipped."); "the current test round was skipped.");
/* /*
* If the command expects a formula identifier as a parameter, * If the command expects a formula identifier as a parameter,
* determine the type of the formula to which the command refers. * determine the type of the formula to which the command refers.
*/ */
...@@ -536,7 +536,7 @@ void executeUserCommands() ...@@ -536,7 +536,7 @@ void executeUserCommands()
} }
else if (!external_command.empty()) else if (!external_command.empty())
{ {
system(external_command.c_str()); (void) system(external_command.c_str());
round_info.cout << '\n'; round_info.cout << '\n';
round_info.cout.flush(); round_info.cout.flush();
} }
...@@ -825,7 +825,7 @@ pair<string, bool> parseRedirection(vector<string>& input_tokens) ...@@ -825,7 +825,7 @@ pair<string, bool> parseRedirection(vector<string>& input_tokens)
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* *
* Description: Tests whether the last argument to a user command specifies * Description: Tests whether the last argument to a user command specifies
* output redirection. If redirection is requested, the * output redirection. If redirection is requested, the
* "argument" specifying the redirection is removed from the * "argument" specifying the redirection is removed from the
* vector of strings forming the command. * vector of strings forming the command.
* *
......
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