Re: [GSoC][PATCH 4/6] t-reftable-pq: make merged_iter_pqueue_check() callable by reference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 06, 2024 at 01:10:48PM +0530, Chandra Pratap wrote:
> diff --git a/t/unit-tests/t-reftable-pq.c b/t/unit-tests/t-reftable-pq.c
> index 5c5a4ecdc5..30bf9cb492 100644
> --- a/t/unit-tests/t-reftable-pq.c
> +++ b/t/unit-tests/t-reftable-pq.c
> @@ -10,11 +10,11 @@ license that can be found in the LICENSE file or at
>  #include "reftable/constants.h"
>  #include "reftable/pq.h"
>  
> -static void merged_iter_pqueue_check(struct merged_iter_pqueue pq)
> +static void merged_iter_pqueue_check(const struct merged_iter_pqueue *pq)
>  {
> -	for (int i = 1; i < pq.len; i++) {
> +	for (int i = 1; i < pq->len; i++) {

Nit: we might also change this to `size_t i` while at it. I know that
these changes are not super popular, but I eventually want Git to
compile cleanly with `-Wsign-conversion`. So the more issues we fix
while at it, the smaller the patch series for this needs to be.

Patrick

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux