(to eliminate cppcheck warnings)
* extra/MacOS.c (GC_MacFreeTemporaryMemory): Cast GC_gc_no to unsigned
long, and adjust fprintf format specifier appropriately.
* extra/msvc_dbg.c (GetDescriptionFromAddress): Cast line_number to
int when passed to wsprintf() to match format specifier.
if (GC_print_stats) {
fprintf(stdout, "[total memory used: %ld bytes.]\n",
totalMemoryUsed);
- fprintf(stdout, "[total collections: %ld.]\n", GC_gc_no);
+ fprintf(stdout, "[total collections: %lu]\n",
+ (unsigned long)GC_gc_no);
}
# endif
}
size = (GC_ULONG_PTR)end < (GC_ULONG_PTR)buffer ? 0 : end - buffer;
if (line_number) {
- wsprintf(str, "(%d) : ", line_number);
+ wsprintf(str, "(%d) : ", (int)line_number);
if (size) {
strncpy(buffer, str, size)[size - 1] = 0;
}