summaryrefslogtreecommitdiff
path: root/checksums.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2017-08-30 10:00:46 +0300
committerIvan Maidanski <ivmai@mail.ru>2017-08-30 10:00:46 +0300
commit57406a0b54473fa18eeaa7dfca002635481e5cb9 (patch)
treeea271598fc97fd31d1568c785e2fba6a78af48f6 /checksums.c
parentaa406bd7dd2106b2bf9a51edaabc2ce65a22c95d (diff)
downloadbdwgc-57406a0b54473fa18eeaa7dfca002635481e5cb9.tar.gz
Remove unnecessary type casts of printf arguments to unsigned long
(code refactoring) * alloc.c [!NO_DEBUGGING] (GC_print_heap_sects): Remove unnecessary cast to unsigned long in GC_*_printf call and adjust printf format specifier to match the argument type. * checksums.c [CHECKSUMS] (GC_checksum): Likewise. * mark.c [PARALLEL_MARK] (GC_mark_local): Likewise. * tests/test.c (typed_test): Likewise. * checksums.c [CHECKSUMS] (GC_checksum): Change type of GC_n_clean, GC_n_dirty from int to unsigned long.
Diffstat (limited to 'checksums.c')
-rw-r--r--checksums.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/checksums.c b/checksums.c
index 49120c39..4847661a 100644
--- a/checksums.c
+++ b/checksums.c
@@ -93,8 +93,8 @@ STATIC word GC_checksum(struct hblk *h)
int GC_n_dirty_errors = 0;
int GC_n_faulted_dirty_errors = 0;
int GC_n_changed_errors = 0;
-int GC_n_clean = 0;
-int GC_n_dirty = 0;
+unsigned long GC_n_clean = 0;
+unsigned long GC_n_dirty = 0;
STATIC void GC_update_check_page(struct hblk *h, int index)
{
@@ -199,14 +199,13 @@ void GC_check_dirty(void)
}
out:
GC_COND_LOG_PRINTF("Checked %lu clean and %lu dirty pages\n",
- (unsigned long)GC_n_clean, (unsigned long)GC_n_dirty);
+ GC_n_clean, GC_n_dirty);
if (GC_n_dirty_errors > 0) {
GC_err_printf("Found %d dirty bit errors (%d were faulted)\n",
GC_n_dirty_errors, GC_n_faulted_dirty_errors);
}
if (GC_n_changed_errors > 0) {
- GC_err_printf("Found %lu changed bit errors\n",
- (unsigned long)GC_n_changed_errors);
+ GC_err_printf("Found %d changed bit errors\n", GC_n_changed_errors);
GC_err_printf(
"These may be benign (provoked by nonpointer changes)\n");
# ifdef THREADS