[Rpm-maint] [rpm-software-management/rpm] Fix signed vs unsigned comparisons (PR #3515)
Panu Matilainen
notifications at github.com
Mon Jan 13 10:09:53 UTC 2025
@pmatilai commented on this pull request.
> @@ -213,8 +213,8 @@ static void poolHashPrintStats(rpmstrPool pool)
}
}
}
- fprintf(stderr, "Hashsize: %i\n", ht->numBuckets);
- fprintf(stderr, "Keys: %i\n", ht->keyCount);
+ fprintf(stderr, "Hashsize: %li\n", ht->numBuckets);
+ fprintf(stderr, "Keys: %li\n", ht->keyCount);
This happens to compile on x86_64 but isn't right: size_t isn't guaranteed long, and "i" denotes signed integer where this is changing them to unsigned. %zu is the appropriate formatting for size_t.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3515#pullrequestreview-2546199524
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/3515/review/2546199524 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20250113/6d6af2b6/attachment.htm>
More information about the Rpm-maint
mailing list