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

Another Clang report.

* iface/nips/nips.cc (format_state): Do not use a variable-sized
array, this is not allowed in C++.
parent 019c85df
2010-11-27 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Another Clang report.
* iface/nips/nips.cc (format_state): Do not use a variable-sized
array, this is not allowed in C++.
2010-11-27 Alexandre Duret-Lutz <adl@lrde.epita.fr> 2010-11-27 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Fix more errors reported by Clang. Fix more errors reported by Clang.
......
// Copyright (C) 2008 Laboratoire de Recherche et Développement // Copyright (C) 2008, 2010 Laboratoire de Recherche et Dveloppement
// de l'Epita (LRDE). // de l'Epita (LRDE).
// //
// This file is part of Spot, a model checking library. // This file is part of Spot, a model checking library.
...@@ -339,11 +339,14 @@ namespace spot ...@@ -339,11 +339,14 @@ namespace spot
{ {
const state_nips* s = dynamic_cast<const state_nips*>(state); const state_nips* s = dynamic_cast<const state_nips*>(state);
unsigned size = global_state_to_str(s->get_state(), 0, 0, 0); unsigned size = global_state_to_str(s->get_state(), 0, 0, 0);
char buf[size]; char* buf = new char[size];
global_state_to_str(s->get_state(), 0, buf, size); global_state_to_str(s->get_state(), 0, buf, size);
return std::string(buf); std::string res(buf);
delete buf;
return res;
} }
bdd bdd
......
Supports Markdown
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