get rid of small bugs/warnings

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1874 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2007-05-02 11:12:39 +00:00
parent d79a6f8dcf
commit 2d3d3ff22c
2 changed files with 4 additions and 2 deletions

View File

@ -644,7 +644,7 @@ ParseTerm(int prio, JMPBUFF *FailBuff)
if (IsPosfixOp(opinfo, &opprio, &oplprio) if (IsPosfixOp(opinfo, &opprio, &oplprio)
&& opprio <= prio && oplprio >= curprio) { && opprio <= prio && oplprio >= curprio) {
/* parse as posfix operator */ /* parse as posfix operator */
Functor fun = Yap_MkFunctor((Atom) Yap_tokptr->TokInfo, 1); Functor func = Yap_MkFunctor((Atom) Yap_tokptr->TokInfo, 1);
if (func == NULL) { if (func == NULL) {
Yap_ErrorMessage = "Heap Overflow"; Yap_ErrorMessage = "Heap Overflow";
FAIL; FAIL;

View File

@ -1092,6 +1092,7 @@ open_query execution;
X_API qid_t PL_open_query(module_t ctx, int flags, predicate_t p, term_t t0) X_API qid_t PL_open_query(module_t ctx, int flags, predicate_t p, term_t t0)
{ {
YAP_Atom yname;
atom_t name; atom_t name;
unsigned long int arity; unsigned long int arity;
YAP_Module m; YAP_Module m;
@ -1103,7 +1104,8 @@ X_API qid_t PL_open_query(module_t ctx, int flags, predicate_t p, term_t t0)
} }
execution.open=1; execution.open=1;
execution.state=0; execution.state=0;
YAP_PredicateInfo(p, (YAP_Atom *)&name, &arity, &m); YAP_PredicateInfo(p, &yname, &arity, &m);
name = (atom_t)yname;
t[0] = YAP_ModuleName(m); t[0] = YAP_ModuleName(m);
if (arity == 0) { if (arity == 0) {
t[1] = YAP_MkAtomTerm((YAP_Atom)name); t[1] = YAP_MkAtomTerm((YAP_Atom)name);