replace sprintf by snprintf
This was reported by Pierre Ganty, who said that sprintf is reported as deprecated on MacOS 13.5.2 (22G91). * spot/twa/acc.cc, spot/twaalgos/aiger.cc: Here.
This commit is contained in:
parent
7149521f48
commit
d96796121a
2 changed files with 2 additions and 2 deletions
|
|
@ -2134,7 +2134,7 @@ namespace spot
|
||||||
if (*input != c)
|
if (*input != c)
|
||||||
{
|
{
|
||||||
char msg[20];
|
char msg[20];
|
||||||
sprintf(msg, "was expecting %c '.'", c);
|
std::snprintf(msg, sizeof msg, "was expecting '%c'.", c);
|
||||||
syntax_error(input, msg);
|
syntax_error(input, msg);
|
||||||
}
|
}
|
||||||
++input;
|
++input;
|
||||||
|
|
|
||||||
|
|
@ -2224,7 +2224,7 @@ namespace spot
|
||||||
// vars are unsigned -> 10 digits at most
|
// vars are unsigned -> 10 digits at most
|
||||||
char gate_buffer[3 * 10 + 5];
|
char gate_buffer[3 * 10 + 5];
|
||||||
auto write_gate = [&](unsigned o, unsigned i0, unsigned i1) {
|
auto write_gate = [&](unsigned o, unsigned i0, unsigned i1) {
|
||||||
std::sprintf(gate_buffer, "%u %u %u\n", o, i0, i1);
|
std::snprintf(gate_buffer, sizeof gate_buffer, "%u %u %u\n", o, i0, i1);
|
||||||
os << gate_buffer;
|
os << gate_buffer;
|
||||||
};
|
};
|
||||||
// Count active gates
|
// Count active gates
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue