bug-bash
[Top][All Lists]
Advanced

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

Re: Some compile-time warnings


From: Martin D Kealey
Subject: Re: Some compile-time warnings
Date: Mon, 29 Sep 2025 15:00:26 +1000

On Mon, 29 Sept 2025 at 07:46, Pourko via Bug reports for the GNU Bourne
Again SHell <bug-bash@gnu.org> wrote:

> Should we be worrying about these warnings?
>

The const warnings are annoying but can be ignored for now.

The malloc size warning is concerning, as the excessive “size” is
(uint64_t)(-1).

-Martin

PS: since Bash is now targeting C99, the work-around
(p?realloc(p,s):malloc(s)) should no longer be necessary; just use
realloc(p,s). (ISO/IEC 9899:1999 §7.20.3.4 and ISO/IEC 9899:2024 §7.24.3.7
both say: “If ptr is a null pointer, the realloc function behaves like the
malloc function for the specified size.”)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]