public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
* Subject: [PATCH] object-file: fix sparse 'plain integer as NULL pointer' error
@ 2026-03-19 22:49 Ramsay Jones
  2026-03-20  1:35 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Ramsay Jones @ 2026-03-19 22:49 UTC (permalink / raw)
  To: Patrick Steinhardt; +Cc: GIT Mailing-list


Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---

Hi Patrick,

When you next re-roll your 'ps/object-counting' branch, could you please squash this
into the patch equivalent to the commit 2b24db1110 ("object-file: generalize counting
objects",2026-03-12) in tonight's 'seen' branch.

Thanks,

ATB,
Ramsay Jones


 object-file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/object-file.c b/object-file.c
index 35be7e58cb..3708b8f18d 100644
--- a/object-file.c
+++ b/object-file.c
@@ -1941,7 +1941,7 @@ int odb_source_loose_count_objects(struct odb_source *source,
 	} else {
 		*out = 0;
 		ret = odb_source_loose_for_each_object(source, NULL, count_loose_object,
-						       out, 0);
+						       out, NULL);
 	}
 
 out:
-- 
2.53.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: Subject: [PATCH] object-file: fix sparse 'plain integer as NULL pointer' error
  2026-03-19 22:49 Subject: [PATCH] object-file: fix sparse 'plain integer as NULL pointer' error Ramsay Jones
@ 2026-03-20  1:35 ` Junio C Hamano
  2026-03-20  2:04   ` Ramsay Jones
  0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2026-03-20  1:35 UTC (permalink / raw)
  To: Ramsay Jones; +Cc: Patrick Steinhardt, GIT Mailing-list

Ramsay Jones <ramsay@ramsayjones.plus.com> writes:

> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
> ---
>
> Hi Patrick,
>
> When you next re-roll your 'ps/object-counting' branch, could you please squash this
> into the patch equivalent to the commit 2b24db1110 ("object-file: generalize counting
> objects",2026-03-12) in tonight's 'seen' branch.

The topic being in 'next' since March 17th, that is a bit awkward to
arrange.  I can queue the fix on top instead.

>
> Thanks,
>
> ATB,
> Ramsay Jones
>
>
>  object-file.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/object-file.c b/object-file.c
> index 35be7e58cb..3708b8f18d 100644
> --- a/object-file.c
> +++ b/object-file.c
> @@ -1941,7 +1941,7 @@ int odb_source_loose_count_objects(struct odb_source *source,
>  	} else {
>  		*out = 0;
>  		ret = odb_source_loose_for_each_object(source, NULL, count_loose_object,
> -						       out, 0);
> +						       out, NULL);
>  	}
>  
>  out:

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Subject: [PATCH] object-file: fix sparse 'plain integer as NULL pointer' error
  2026-03-20  1:35 ` Junio C Hamano
@ 2026-03-20  2:04   ` Ramsay Jones
  2026-03-20  3:44     ` Ramsay Jones
  2026-03-20  6:05     ` Junio C Hamano
  0 siblings, 2 replies; 6+ messages in thread
From: Ramsay Jones @ 2026-03-20  2:04 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Patrick Steinhardt, GIT Mailing-list



On 20/03/2026 1:35 am, Junio C Hamano wrote:
> Ramsay Jones <ramsay@ramsayjones.plus.com> writes:
> 
>> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
>> ---
>>
>> Hi Patrick,
>>
>> When you next re-roll your 'ps/object-counting' branch, could you please squash this
>> into the patch equivalent to the commit 2b24db1110 ("object-file: generalize counting
>> objects",2026-03-12) in tonight's 'seen' branch.
> 
> The topic being in 'next' since March 17th, that is a bit awkward to
> arrange.  I can queue the fix on top instead.

Hmm, odd. I didn't do a 'branch --contains', obviously, but this only started tonight
(and I built git yesterday - master, next and seen), so I just assumed ... ;)

Sorry about that.

Thanks.

ATB,
Ramsay Jones



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Subject: [PATCH] object-file: fix sparse 'plain integer as NULL pointer' error
  2026-03-20  2:04   ` Ramsay Jones
@ 2026-03-20  3:44     ` Ramsay Jones
  2026-03-20  6:14       ` Patrick Steinhardt
  2026-03-20  6:05     ` Junio C Hamano
  1 sibling, 1 reply; 6+ messages in thread
From: Ramsay Jones @ 2026-03-20  3:44 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Patrick Steinhardt, GIT Mailing-list


On 20/03/2026 02:04, Ramsay Jones wrote:
>
> On 20/03/2026 1:35 am, Junio C Hamano wrote:
>> Ramsay Jones <ramsay@ramsayjones.plus.com> writes:
>>
>>> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
>>> ---
>>>
>>> Hi Patrick,
>>>
>>> When you next re-roll your 'ps/object-counting' branch, could you please squash this
>>> into the patch equivalent to the commit 2b24db1110 ("object-file: generalize counting
>>> objects",2026-03-12) in tonight's 'seen' branch.
>> The topic being in 'next' since March 17th, that is a bit awkward to
>> arrange.  I can queue the fix on top instead.
> Hmm, odd. I didn't do a 'branch --contains', obviously, but this only started tonight
> (and I built git yesterday - master, next and seen), so I just assumed ... ;)
>
> Sorry about that.
>

Heh, I could not sleep, so took another look! :)


The problem was actually caused by the 
'ps/odb-generic-object-name-handling' branch and commit 936c2bfecb 
("odb: introduce

`struct odb_for_each_object_options`", 2026-03-19). In particular,  that 
commit changes the type of the last parameter of the

odb_source_loose_for_each_object() function from 'unsigned' to 'const 
struct odb_for_each_object_options *', without

changing one call site from '0' to 'NULL'.


OK, I can go to bed now!


Thanks.


ATB,

Ramsay Jones



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Subject: [PATCH] object-file: fix sparse 'plain integer as NULL pointer' error
  2026-03-20  2:04   ` Ramsay Jones
  2026-03-20  3:44     ` Ramsay Jones
@ 2026-03-20  6:05     ` Junio C Hamano
  1 sibling, 0 replies; 6+ messages in thread
From: Junio C Hamano @ 2026-03-20  6:05 UTC (permalink / raw)
  To: Ramsay Jones; +Cc: Patrick Steinhardt, GIT Mailing-list

Ramsay Jones <ramsay@ramsayjones.plus.com> writes:

> On 20/03/2026 1:35 am, Junio C Hamano wrote:
>> Ramsay Jones <ramsay@ramsayjones.plus.com> writes:
>> 
>>> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
>>> ---
>>>
>>> Hi Patrick,
>>>
>>> When you next re-roll your 'ps/object-counting' branch, could you please squash this
>>> into the patch equivalent to the commit 2b24db1110 ("object-file: generalize counting
>>> objects",2026-03-12) in tonight's 'seen' branch.
>> 
>> The topic being in 'next' since March 17th, that is a bit awkward to
>> arrange.  I can queue the fix on top instead.
>
> Hmm, odd. I didn't do a 'branch --contains', obviously, but this only started tonight
> (and I built git yesterday - master, next and seen), so I just assumed ... ;)
>
> Sorry about that.

FWIW, my local build & test did not catch this until today, only
because the version of sparse I was running was a tad old.  After
updating it today, I started seeing the breakage there.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Subject: [PATCH] object-file: fix sparse 'plain integer as NULL pointer' error
  2026-03-20  3:44     ` Ramsay Jones
@ 2026-03-20  6:14       ` Patrick Steinhardt
  0 siblings, 0 replies; 6+ messages in thread
From: Patrick Steinhardt @ 2026-03-20  6:14 UTC (permalink / raw)
  To: Ramsay Jones; +Cc: Junio C Hamano, GIT Mailing-list

On Fri, Mar 20, 2026 at 03:44:08AM +0000, Ramsay Jones wrote:
> 
> On 20/03/2026 02:04, Ramsay Jones wrote:
> > 
> > On 20/03/2026 1:35 am, Junio C Hamano wrote:
> > > Ramsay Jones <ramsay@ramsayjones.plus.com> writes:
> > > 
> > > > Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
> > > > ---
> > > > 
> > > > Hi Patrick,
> > > > 
> > > > When you next re-roll your 'ps/object-counting' branch, could you please squash this
> > > > into the patch equivalent to the commit 2b24db1110 ("object-file: generalize counting
> > > > objects",2026-03-12) in tonight's 'seen' branch.
> > > The topic being in 'next' since March 17th, that is a bit awkward to
> > > arrange.  I can queue the fix on top instead.
> > Hmm, odd. I didn't do a 'branch --contains', obviously, but this only started tonight
> > (and I built git yesterday - master, next and seen), so I just assumed ... ;)
> > 
> > Sorry about that.
> > 
> 
> Heh, I could not sleep, so took another look! :)
> 
> 
> The problem was actually caused by the 'ps/odb-generic-object-name-handling'
> branch and commit 936c2bfecb ("odb: introduce
> 
> `struct odb_for_each_object_options`", 2026-03-19). In particular,  that
> commit changes the type of the last parameter of the
> 
> odb_source_loose_for_each_object() function from 'unsigned' to 'const struct
> odb_for_each_object_options *', without
> 
> changing one call site from '0' to 'NULL'.
> 
> 
> OK, I can go to bed now!

Thanks for catching this! Fixed locally now.

Patrick

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-03-20  6:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-19 22:49 Subject: [PATCH] object-file: fix sparse 'plain integer as NULL pointer' error Ramsay Jones
2026-03-20  1:35 ` Junio C Hamano
2026-03-20  2:04   ` Ramsay Jones
2026-03-20  3:44     ` Ramsay Jones
2026-03-20  6:14       ` Patrick Steinhardt
2026-03-20  6:05     ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox