small warnings.

This commit is contained in:
Vitor Santos Costa 2014-11-25 16:42:35 +00:00
parent 50659967ed
commit 2be225c17a
12 changed files with 34 additions and 18 deletions

View File

@ -39,7 +39,7 @@ CWD=$(PWD)
#
DYNAMIC =
CFLAGS = @CFLAGS@
CFLAGS = @CFLAGS@ -D__ANSI_C__=1
INCLUDE = -I@abs_top_builddir@ @CUDD_CPPFLAGS@
LINKFLAGS = -lm
LINKLIBS = @CUDD_LIBS@

View File

@ -25,7 +25,7 @@ void ADTError(char *name, ADTErrorCodes error, char *proc)
fprintf(stderr,"ADT Error: ");
fprintf(stderr," Module: %s\n",name);
fprintf(stderr," Procedure: %s\n",proc);
fprintf(stderr," Error Code: %s\n",error);
fprintf(stderr," Error Code: %u\n",error);
exit(1);
}
@ -43,5 +43,5 @@ void ADTWarning(char *name, ADTWarningCodes warning, char *proc)
fprintf(stderr,"ADT Warning: ");
fprintf(stderr," Module: %s\n",name);
fprintf(stderr," Procedure: %s\n",proc);
fprintf(stderr," Warning Code: %s\n",warning);
fprintf(stderr," Warning Code: %u\n",warning);
}

View File

@ -67,8 +67,8 @@ void ADTWarning(char *name, ADTWarningCodes warning, char *proc);
#else
void ADTError();
void ADTWarning();
void ADTError(void);
void ADTWarning(void);
#endif

View File

@ -13,6 +13,8 @@
#ifndef APT_H
#define APT_H
#include <stdlib.h>
/* ---------- Defines */
#ifndef ERROR
@ -52,8 +54,9 @@
#endif
/* ---------- Types */
#ifndef __ANSI_C__
#define __ANSI_C__
#endif
typedef void (*ApplyFunction)(void*);
typedef void (*ApplyFunction1)(void*,void*);

View File

@ -64,8 +64,10 @@ int start;
if (q)
qi = ((QueueIterator)Allocate(sizeof(_QueueIterator)));
else
ADTError(ADT_QueueIter, E_NullQueue, "QueueIteratorNew");
else {
ADTError(ADT_QueueIter, E_NullQueue, "QueueIteratorNew");
return NULL;
}
if (qi) {
qi->queue = q;
QueueIteratorAbsoluteSeek(qi, start);

View File

@ -725,13 +725,16 @@ void myexpand(extmanager MyManager, DdNode *Current) {
double CalcProbability(extmanager MyManager, DdNode *Current) {
DdNode *h, *l;
hisnode *Found;
char *curnode, *dynvalue;
hisnode *Found = NULL;
char *curnode; //, *dynvalue;
double lvalue, hvalue, tvalue;
density_integral dynvalue_parsed;
// density_integral dynvalue_parsed;
if (params.debug) {
curnode = GetNodeVarNameDisp(MyManager.manager, MyManager.varmap, Current);
fprintf(stderr, "%s\n", curnode);
} else {
// gcc stupidly complains.
curnode = NULL;
}
if (Current == MyManager.t) return 1.0;
if (Current == MyManager.f) return 0.0;
@ -811,7 +814,7 @@ static
void PrintNodeQueue(Queue q , extmanager MyManager){
QueueIterator qiter = QueueIteratorNew(q, 1);
fprintf(stderr,"Queue %p is [", *q);
fprintf(stderr,"Queue %p is [", q);
while (qiter->currentItem != NULL) {
DdNode* val = (DdNode*) qiter->currentItem->element;

View File

@ -320,6 +320,7 @@ int RepairVarcnt(namedvars *varmap);
char* GetNodeVarName(DdManager *manager, namedvars varmap, DdNode *node);
char* GetNodeVarNameDisp(DdManager *manager, namedvars varmap, DdNode *node);
int all_loaded(namedvars varmap, int disp);
int all_loaded_for_deterministic_variables(namedvars varmap, int disp);
/* Traversal */

View File

@ -455,7 +455,7 @@ c_db_odbc_number_of_fields( USES_REGS1 ) {
char sql[256];
SQLSMALLINT number_fields;
sprintf(sql,"SELECT column_name from INFORMATION_SCHEMA.COLUMNS where table_name = \'%s\' group by column_name order by min(dtd_identifier)",relation);
sprintf(sql,"SELECT column_name from INFORMATION_SCHEMA.COLUMNS where table_name = \'%s\' GROUP BY column_name, dtd_identifier ORDER BY CAST(dtd_identifier AS INTEGER)",relation);
if (!SQLALLOCHANDLE(SQL_HANDLE_STMT, hdbc, &hstmt, "db_number_of_fields"))
return FALSE;
@ -495,7 +495,7 @@ c_db_odbc_get_attributes_types( USES_REGS1 ) {
Term head, list;
list = arg_types_list;
sprintf(sql,"SELECT column_name,data_type FROM INFORMATION_SCHEMA.COLUMNS where table_name = \'%s\' group by column_name,data_type order by min(dtd_identifier)",relation);
sprintf(sql,"SELECT column_name,data_type from INFORMATION_SCHEMA.COLUMNS WHERE table_name = \'%s\' GROUP BY column_name, dtd_identifier ORDER BY CAST(dtd_identifier AS INTEGER)",relation);
if (!SQLALLOCHANDLE(SQL_HANDLE_STMT, hdbc, &hstmt, "db_get_attributes_types"))
return FALSE;

View File

@ -27,6 +27,8 @@
#include "myddas_statistics.h"
#endif
void init_myddas(void);
static Int c_db_initialize_myddas( USES_REGS1 );
static Int c_db_connection_type( USES_REGS1 );
static Int c_db_add_preds( USES_REGS1 );

View File

@ -33,8 +33,12 @@
#elif defined DARWIN
/* (empty) */
#else
#ifndef isfinite
#define isfinite(x) (0.0 * (x) != 0.0)
#endif
#ifndef isnan
#define isnan(x) ((x) != (x))
#endif
#define INFINITY HUGE_VAL
#endif

View File

@ -562,7 +562,8 @@ int pc_clean_external_tables_0(void)
*/
int pc_export_sw_info_1(void)
{
int sw_id,instance_id,fixed,fixed_h;
// int sw_id;
int instance_id,fixed,fixed_h;
double prob,smooth;
TERM p_switches, p_switch;
TERM p_instance_list,p_prob_list,p_smooth_list;
@ -574,7 +575,7 @@ int pc_export_sw_info_1(void)
/* p_switch: sw(Id,InstList,ProbList,SmoothCList,FixedP,FixedH) */
p_switch = bpx_get_car(p_switches);
sw_id = bpx_get_integer(bpx_get_arg(1,p_switch));
// sw_id = bpx_get_integer(bpx_get_arg(1,p_switch));
p_instance_list = bpx_get_arg(2,p_switch);
p_prob_list = bpx_get_arg(3,p_switch);
p_smooth_list = bpx_get_arg(4,p_switch);

View File

@ -580,7 +580,7 @@ lbool Solver::search(int nof_conflicts, int nof_learnts)
starts++;
bool first = true;
// bool first = true;
for (;;){
Clause* confl = propagate();
@ -589,7 +589,7 @@ lbool Solver::search(int nof_conflicts, int nof_learnts)
conflicts++; conflictC++;
if (decisionLevel() == 0) return l_False;
first = false;
// first = false;
learnt_clause.clear();
analyze(confl, learnt_clause, backtrack_level);