Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Fix return value of `realloc` not stored
- X-seq: zsh-workers 53307
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Cc: Dimitris Apostolou <dimitris.apostolou@xxxxxxxxxx>
- Subject: Re: Fix return value of `realloc` not stored
- Date: Fri, 3 Jan 2025 18:44:50 +0100
- Archived-at: <https://zsh.org/workers/53307>
- In-reply-to: <CAH+w=7ZjwHUzhU9yHtUuZHbET0ngNfwvp+eH8Hj97cPhj6+ugw@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <0BF02875-7CEF-41D2-AFE5-A394DC780B10@icloud.com> <CAH+w=7ZjwHUzhU9yHtUuZHbET0ngNfwvp+eH8Hj97cPhj6+ugw@mail.gmail.com>
On Fri, Jan 3, 2025 at 6:06 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> On Fri, Jan 3, 2025 at 8:24 AM Dimitris Apostolou
> <dimitris.apostolou@xxxxxxxxxx> wrote:
> >
> > zsh/Src/Modules/watch.c:567:7: error: Return value of allocation function 'realloc' is not stored. [leakReturnValNotUsed]
>
> This also looks like a false positive to me, the analyzer has not
> properly recognized that the assignment operator on line 566 stores
> the value from the realloc() call on line 567. Please explain how
> your new code is functionally different from the previous code?
>
> Also when submitting patches, please provide a prose rationale, rather
> than just quoting a lint message.
Also2, please don't make it bright green. (or any other color)
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author