get rid of warning

This commit is contained in:
Vitor Santos Costa 2016-04-28 14:57:59 +01:00
parent f23b8b5418
commit 235179ff47

View File

@ -474,7 +474,7 @@ static Int doformat(volatile Term otail, volatile Term oargs,
format_info finfo; format_info finfo;
unsigned char *ubuf = NULL; unsigned char *ubuf = NULL;
Term fmod = CurrentModule; Term fmod = CurrentModule;
size_t sz; size_t sz = 0;
finfo.padders = 0; finfo.padders = 0;
finfo.format_error = FALSE; finfo.format_error = FALSE;
@ -489,7 +489,7 @@ static Int doformat(volatile Term otail, volatile Term oargs,
*HR++ = otail; *HR++ = otail;
if (!Yap_growheap(FALSE, LOCAL_Error_Size, NULL)) { if (!Yap_growheap(FALSE, LOCAL_Error_Size, NULL)) {
Yap_Error(RESOURCE_ERROR_HEAP, otail, "format/2"); Yap_Error(RESOURCE_ERROR_HEAP, otail, "format/2");
return FALSE; return false;
} }
oargs = HR[-2]; oargs = HR[-2];
otail = HR[-1]; otail = HR[-1];
@ -515,7 +515,7 @@ static Int doformat(volatile Term otail, volatile Term oargs,
if ((fr = copy_format_string(tail, fstr0, sz)) == fst_ok) if ((fr = copy_format_string(tail, fstr0, sz)) == fst_ok)
break; break;
if (fr == fst_error) if (fr == fst_error)
return FALSE; return false;
sz += 256; sz += 256;
Yap_FreeCodeSpace(fstr0); Yap_FreeCodeSpace(fstr0);
} while (TRUE); } while (TRUE);
@ -525,7 +525,7 @@ static Int doformat(volatile Term otail, volatile Term oargs,
fstr = fptr = StringOfTerm(tail); fstr = fptr = StringOfTerm(tail);
} else { } else {
Yap_Error(SYSTEM_ERROR_SAVED_STATE, tail, "format/2"); Yap_Error(SYSTEM_ERROR_SAVED_STATE, tail, "format/2");
return FALSE; return false;
} }
if (IsVarTerm(args)) { if (IsVarTerm(args)) {
Yap_Error(INSTANTIATION_ERROR, args, "format/2"); Yap_Error(INSTANTIATION_ERROR, args, "format/2");
@ -564,7 +564,7 @@ static Int doformat(volatile Term otail, volatile Term oargs,
} else { } else {
break; break;
} }
} while (TRUE); } while (true);
} else if (args != TermNil) { } else if (args != TermNil) {
tnum = 1; tnum = 1;
mytargs[0] = args; mytargs[0] = args;