[buddy] fix ARM compilation

* src/bddop.c, src/bddx.h, examples/bddtest/bddtest.cxx: Use signed
char* instead of char*.
This commit is contained in:
Alexandre Duret-Lutz 2019-09-24 16:56:39 +02:00
parent 7039112e41
commit 78f0c4418d
3 changed files with 6 additions and 6 deletions

View file

@ -8,7 +8,7 @@ static const int varnum = 5;
Example of allsat print handler. Example of allsat print handler.
**************************************************************************/ **************************************************************************/
void allsatHandlerPrint(char* varset, int size) void allsatHandlerPrint(signed char* varset, int size)
{ {
using namespace std ; using namespace std ;
for (int v=0; v<size ; ++v) for (int v=0; v<size ; ++v)
@ -26,7 +26,7 @@ void allsatHandlerPrint(char* varset, int size)
static bdd allsatBDD; static bdd allsatBDD;
static bdd allsatSumBDD; static bdd allsatSumBDD;
void allsatHandler(char* varset, int size) void allsatHandler(signed char* varset, int size)
{ {
bdd x = bddtrue; bdd x = bddtrue;
for (int v=0 ; v<size ; ++v) for (int v=0 ; v<size ; ++v)

View file

@ -122,7 +122,7 @@ static int firstReorder; /* Used instead of local variable in order
to avoid compiler warning about 'first' to avoid compiler warning about 'first'
being clobbered by setjmp */ being clobbered by setjmp */
static char* allsatProfile; /* Variable profile for bdd_allsat() */ static signed char* allsatProfile; /* Variable profile for bdd_allsat() */
static bddallsathandler allsatHandler; /* Callback handler for bdd_allsat() */ static bddallsathandler allsatHandler; /* Callback handler for bdd_allsat() */
extern bddCacheStat bddcachestats; extern bddCacheStat bddcachestats;
@ -2691,7 +2691,7 @@ DESCR {* Iterates through all legal variable assignments (those
The following is an example of a callback handler that The following is an example of a callback handler that
prints 'X' for don't cares, '0' for zero, and '1' for one: prints 'X' for don't cares, '0' for zero, and '1' for one:
\begin{verbatim} \begin{verbatim}
void allsatPrintHandler(char* varset, int size) void allsatPrintHandler(signed char* varset, int size)
{ {
for (int v=0; v<size ; ++v) for (int v=0; v<size ; ++v)
{ {
@ -2713,7 +2713,7 @@ void bdd_allsat(BDD r, bddallsathandler handler)
CHECKn(r); CHECKn(r);
if (__unlikely((allsatProfile=(char*)malloc(bddvarnum)) == NULL)) if (__unlikely((allsatProfile=(signed char*)malloc(bddvarnum)) == NULL))
{ {
bdd_error(BDD_MEMORY); bdd_error(BDD_MEMORY);
return; return;

View file

@ -268,7 +268,7 @@ typedef void (*bddgbchandler)(int,bddGbcStat*);
typedef void (*bdd2inthandler)(int,int); typedef void (*bdd2inthandler)(int,int);
typedef int (*bddsizehandler)(void); typedef int (*bddsizehandler)(void);
typedef void (*bddfilehandler)(FILE *, int); typedef void (*bddfilehandler)(FILE *, int);
typedef void (*bddallsathandler)(char*, int); typedef void (*bddallsathandler)(signed char*, int);
BUDDY_API bddinthandler bdd_error_hook(bddinthandler); BUDDY_API bddinthandler bdd_error_hook(bddinthandler);
BUDDY_API bddgbchandler bdd_gbc_hook(bddgbchandler); BUDDY_API bddgbchandler bdd_gbc_hook(bddgbchandler);