Jonathan Nieder writes:
> How about something like the following?
>
> diff --git i/cache.h w/cache.h
> index f2915509..ba028b75 100644
> --- i/cache.h
> +++ w/cache.h
> @@ -1124,6 +1124,7 @@ struct object_info {
> } packed;
> } u;
> };
> +#define OBJECT_INFO_INIT { NULL, NULL
Hi,
Ramsay Jones wrote:
> Sparse issues some "Using plain integer as NULL pointer" warnings.
> Each warning relates to the use of an '{0}' initialiser expression
> in the declaration of an 'struct object_info'. The first field of
> this structure has pointer type. Thus, in order to suppress these
Jeff King wrote:
> On Thu, Jul 18, 2013 at 09:25:50PM +0100, Ramsay Jones wrote:
>
>> Sparse issues some "Using plain integer as NULL pointer" warnings.
>> Each warning relates to the use of an '{0}' initialiser expression
>> in the declaration of an 'struct object_info'. The first field of
>> thi
On Thu, Jul 18, 2013 at 09:25:50PM +0100, Ramsay Jones wrote:
> Sparse issues some "Using plain integer as NULL pointer" warnings.
> Each warning relates to the use of an '{0}' initialiser expression
> in the declaration of an 'struct object_info'. The first field of
> this structure has pointer t
Sparse issues some "Using plain integer as NULL pointer" warnings.
Each warning relates to the use of an '{0}' initialiser expression
in the declaration of an 'struct object_info'. The first field of
this structure has pointer type. Thus, in order to suppress these
warnings, we replace the initial
Jeff King wrote:
> On Tue, Jul 16, 2013 at 07:57:20AM +0200, Johannes Sixt wrote:
>
>> Am 7/15/2013 19:31, schrieb Ramsay Jones:
>>> Sparse issues three "Using plain integer as NULL pointer" warnings.
>>> Each warning relates to the use of an '{0}' initialiser expression
>>> in the declaration of
Stefan Beller writes:
> And the parse_object_buffer looks like this with respect to the eaten
> variable:
> struct object *parse_object_buffer(...)
> {
> int eaten = 0;
> if (something)
> return NULL;
> ...
>
On 07/18/2013 12:08 AM, Stefan Beller wrote:
>
> So I started using the clang code analyzer on git. One of the
> first warnings actually is this:
>
So in case somebody else would also like to play around with the
clang static code analyzer:
# get clang:
cd
git clone http://llvm.org/git/llvm.g
On 07/16/2013 10:53 PM, Philip Oakley wrote:
>
> Does anyone run the "new static checker called 'Stack' that precisely
> identifies unstable code"? [though the paper's conclusion says 'All
> Stack source code will be publicly available.' which suggests it's not
> yet available]
>
So I started us
I question the value of this warning. Initialization with '=
{0}' is a well-established idiom, and sparse should know about
it.
Thanks everyone for your feedback. But I really wanted to call only the
warning in the case of the '= {0}' idiom into question, not about 0 vs.
NULL in gen
On 16/07/13 22:18, Stefan Beller wrote:
On 07/16/2013 10:53 PM, Philip Oakley wrote:
From: "Jeff King"
Sent: Tuesday, July 16, 2013 7:21 AM
On Tue, Jul 16, 2013 at 07:57:20AM +0200, Johannes Sixt wrote:
Am 7/15/2013 19:31, schrieb Ramsay Jones:
Sparse issues three "Using plain integer as NU
On 07/16/2013 10:53 PM, Philip Oakley wrote:
> From: "Jeff King"
> Sent: Tuesday, July 16, 2013 7:21 AM
>> On Tue, Jul 16, 2013 at 07:57:20AM +0200, Johannes Sixt wrote:
>>
>>> Am 7/15/2013 19:31, schrieb Ramsay Jones:
>>> > Sparse issues three "Using plain integer as NULL pointer" warnings.
>>> >
From: "Jeff King"
Sent: Tuesday, July 16, 2013 7:21 AM
On Tue, Jul 16, 2013 at 07:57:20AM +0200, Johannes Sixt wrote:
Am 7/15/2013 19:31, schrieb Ramsay Jones:
> Sparse issues three "Using plain integer as NULL pointer" warnings.
> Each warning relates to the use of an '{0}' initialiser expres
On Tue, Jul 16, 2013 at 07:57:20AM +0200, Johannes Sixt wrote:
> Am 7/15/2013 19:31, schrieb Ramsay Jones:
> > Sparse issues three "Using plain integer as NULL pointer" warnings.
> > Each warning relates to the use of an '{0}' initialiser expression
> > in the declaration of an 'struct object_info
Am 7/15/2013 19:31, schrieb Ramsay Jones:
> Sparse issues three "Using plain integer as NULL pointer" warnings.
> Each warning relates to the use of an '{0}' initialiser expression
> in the declaration of an 'struct object_info'.
I question the value of this warning. Initialization with '= {0}' is
Sparse issues three "Using plain integer as NULL pointer" warnings.
Each warning relates to the use of an '{0}' initialiser expression
in the declaration of an 'struct object_info'. The first field of
this structure has pointer type. Thus, in order to suppress these
warnings, we replace the initia
16 matches
Mail list logo