[buddy] Fix several PVS-Studio warnings
For #192. * src/bddio.c, src/cppext.cxx, src/kernel.c: Fix printf formats, calls to new, and simplify one check in bdd_delref_nc().
This commit is contained in:
parent
41b47966b0
commit
63818a3e69
3 changed files with 12 additions and 11 deletions
|
|
@ -37,6 +37,7 @@
|
|||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <iomanip>
|
||||
#include <new>
|
||||
#include "kernel.h"
|
||||
#include "bvecx.h"
|
||||
|
||||
|
|
@ -190,7 +191,7 @@ ostream &operator<<(ostream &o, const bdd &r)
|
|||
return o;
|
||||
}
|
||||
|
||||
int *set = new int[bddvarnum];
|
||||
int *set = new (std::nothrow) int[bddvarnum];
|
||||
if (set == NULL)
|
||||
{
|
||||
bdd_error(BDD_MEMORY);
|
||||
|
|
@ -252,7 +253,7 @@ ostream &operator<<(ostream &o, const bdd &r)
|
|||
return o;
|
||||
}
|
||||
|
||||
int *set = new int[bddvarnum];
|
||||
int *set = new (std::nothrow) int[bddvarnum];
|
||||
if (set == NULL)
|
||||
{
|
||||
bdd_error(BDD_MEMORY);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue