Another Clang report.
* iface/nips/nips.cc (format_state): Do not use a variable-sized array, this is not allowed in C++.
This commit is contained in:
parent
019c85dff6
commit
8156766fe3
2 changed files with 13 additions and 3 deletions
|
|
@ -1,3 +1,10 @@
|
|||
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>
|
||||
|
||||
Fix more errors reported by Clang.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2008 Laboratoire de Recherche et Développement
|
||||
// Copyright (C) 2008, 2010 Laboratoire de Recherche et Développement
|
||||
// de l'Epita (LRDE).
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
|
|
@ -339,11 +339,14 @@ namespace spot
|
|||
{
|
||||
const state_nips* s = dynamic_cast<const state_nips*>(state);
|
||||
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);
|
||||
|
||||
return std::string(buf);
|
||||
std::string res(buf);
|
||||
delete buf;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
bdd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue