fix type warnings.

This commit is contained in:
Vítor Santos Costa II 2010-03-22 15:01:54 +00:00
parent c3d2e4cd14
commit b068721c68
4 changed files with 38 additions and 42 deletions

View File

@ -290,10 +290,10 @@ dump_stack(void)
fprintf (stderr,"%%\n%% PC: %s\n",(char *)H);
detect_bug_location(CP, FIND_PRED_FROM_ANYWHERE, (char *)H, 256);
fprintf (stderr,"%% Continuation: %s\n",(char *)H);
fprintf (stderr,"%% %ldKB of Global Stack (%p--%p)\n",(long int)(sizeof(CELL)*(H-H0))/1024,H0,H);
fprintf (stderr,"%% %ldKB of Local Stack (%p--%p)\n",(long int)(sizeof(CELL)*(LCL0-ASP))/1024,ASP,LCL0);
fprintf (stderr,"%% %ldKB of Trail (%p--%p)\n",(long int)((ADDR)TR-Yap_TrailBase)/1024,Yap_TrailBase,TR);
fprintf (stderr,"%% Performed %d garbage collections\n", GcCalls);
fprintf (stderr,"%% %luKB of Global Stack (%p--%p)\n",(unsigned long int)(sizeof(CELL)*(H-H0))/1024,H0,H);
fprintf (stderr,"%% %luKB of Local Stack (%p--%p)\n",(unsigned long int)(sizeof(CELL)*(LCL0-ASP))/1024,ASP,LCL0);
fprintf (stderr,"%% %luKB of Trail (%p--%p)\n",(unsigned long int)((ADDR)TR-Yap_TrailBase)/1024,Yap_TrailBase,TR);
fprintf (stderr,"%% Performed %ld garbage collections\n", (unsigned long int)GcCalls);
#if LOW_LEVEL_TRACER
{
extern long long vsc_count;

View File

@ -3302,15 +3302,15 @@ compact_heap(void)
#ifdef DEBUG
if (dest != start_from-1)
fprintf(Yap_stderr,"%% Bad Dest (%d): %p should be %p\n",
GcCalls,
dest,
start_from);
fprintf(Yap_stderr,"%% Bad Dest (%lu): %p should be %p\n",
(unsigned long int)GcCalls,
dest,
start_from);
if (total_marked != found_marked)
fprintf(Yap_stderr,"%% Upward (%d): %ld total against %ld found\n",
GcCalls,
(unsigned long int)total_marked,
(unsigned long int)found_marked);
fprintf(Yap_stderr,"%% Upward (%lu): %lu total against %lu found\n",
(unsigned long int)GcCalls,
(unsigned long int)total_marked,
(unsigned long int)found_marked);
found_marked = start_from-H0;
#endif
@ -3366,10 +3366,10 @@ compact_heap(void)
}
#ifdef DEBUG
if (total_marked != found_marked)
fprintf(Yap_stderr,"%% Downward (%d): %ld total against %ld found\n",
GcCalls,
(unsigned long int)total_marked,
(unsigned long int)found_marked);
fprintf(Yap_stderr,"%% Downward (%lu): %lu total against %lu found\n",
(unsigned long int)GcCalls,
(unsigned long int)total_marked,
(unsigned long int)found_marked);
#endif
H = dest; /* reset H */
@ -3475,15 +3475,15 @@ icompact_heap(void)
#ifdef DEBUG
if (dest != H0-1)
fprintf(Yap_stderr,"%% Bad Dest (%d): %p should be %p\n",
GcCalls,
dest,
H0-1);
fprintf(Yap_stderr,"%% Bad Dest (%lu): %p should be %p\n",
(unsigned long int)GcCalls,
dest,
H0-1);
if (total_marked != found_marked)
fprintf(Yap_stderr,"%% Upward (%d): %ld total against %ld found\n",
GcCalls,
(unsigned long int)total_marked,
(unsigned long int)found_marked);
fprintf(Yap_stderr,"%% Upward (%lu): %lu total against %lu found\n",
(unsigned long int)GcCalls,
(unsigned long int)total_marked,
(unsigned long int)found_marked);
found_marked = 0;
#endif
@ -3538,15 +3538,15 @@ icompact_heap(void)
}
#ifdef DEBUG
if (H0+total_marked != dest)
fprintf(Yap_stderr,"%% Downward (%d): %p total against %p found\n",
GcCalls,
H0+total_marked,
dest);
fprintf(Yap_stderr,"%% Downward (%lu): %p total against %p found\n",
(unsigned long int)GcCalls,
H0+total_marked,
dest);
if (total_marked != found_marked)
fprintf(Yap_stderr,"%% Downward (%d): %ld total against %ld found\n",
GcCalls,
(unsigned long int)total_marked,
(unsigned long int)found_marked);
fprintf(Yap_stderr,"%% Downward (%lu): %lu total against %lu found\n",
(unsigned long int)GcCalls,
(unsigned long int)total_marked,
(unsigned long int)found_marked);
#endif
H = dest; /* reset H */
@ -3746,7 +3746,7 @@ do_gc(Int predarity, CELL *current_env, yamop *nextop)
#if defined(YAPOR) || defined(THREADS)
fprintf(Yap_stderr, "%% Worker Id %d:\n", worker_id);
#endif
fprintf(Yap_stderr, "%% Start of garbage collection %d:\n", GcCalls);
fprintf(Yap_stderr, "%% Start of garbage collection %lu:\n", (unsigned long int)GcCalls);
fprintf(Yap_stderr, "%% Global: %8ld cells (%p-%p)\n", (long int)heap_cells,H0,H);
fprintf(Yap_stderr, "%% Local:%8ld cells (%p-%p)\n", (unsigned long int)(LCL0-ASP),LCL0,ASP);
fprintf(Yap_stderr, "%% Trail:%8ld cells (%p-%p)\n",
@ -3885,7 +3885,7 @@ do_gc(Int predarity, CELL *current_env, yamop *nextop)
TotGcTime += gc_time;
TotGcRecovered += heap_cells-tot;
if (gc_verbose) {
fprintf(Yap_stderr, "%% GC %d took %g sec, total of %g sec doing GC so far.\n", GcCalls, (double)gc_time/1000, (double)TotGcTime/1000);
fprintf(Yap_stderr, "%% GC %lu took %g sec, total of %g sec doing GC so far.\n", (unsigned long int)GcCalls, (double)gc_time/1000, (double)TotGcTime/1000);
fprintf(Yap_stderr, "%% Left %ld cells free in stacks.\n",
(unsigned long int)(ASP-H));
}

View File

@ -436,6 +436,8 @@ reset_trail(tr_fr_ptr TR0) {
}
}
inline EXTERN void reset_attvars(CELL *dvarsmin, CELL *dvarsmax);
inline EXTERN void
reset_attvars(CELL *dvarsmin, CELL *dvarsmax) {
if (dvarsmin) {
@ -452,6 +454,8 @@ reset_attvars(CELL *dvarsmin, CELL *dvarsmax) {
}
}
inline EXTERN void close_attvar_chain(CELL *dvarsmin, CELL *dvarsmax);
inline EXTERN void
close_attvar_chain(CELL *dvarsmin, CELL *dvarsmax) {
if (dvarsmin) {

View File

@ -966,14 +966,6 @@ RestoreBallTerm(int wid)
}
}
static void
RestoreScratchPad(int wid)
{
if (ScratchPad.ptr) {
ScratchPad.ptr = AddrAdjust(ScratchPad.ptr);
}
}
#include "rglobals.h"
/* restore the failcodes */