Declare bzerrorstrings[] to be a const object.

Mark Wielaard mark@klomp.org
Tue Apr 26 19:35:01 GMT 2022


Hi,

On Tue, Apr 26, 2022 at 04:33:22PM +0200, Carlo Bramini via Bzip2-devel wrote:
> by looking the content of the map file, I discovered that bzerrorstrings[] is not const.

Which map file is this?

> So, I would like to suggest the tiny change into the attached patch, for declaring both bzerrorstrings[] and the addressed strings as const.
> The patch has been created from the latest sources into the repository with GIT.

Although the patch seems fine I must admit that I don't fully
understand why it is necessary. Isn't an array (name) not always
constant? You cannot assign anything to an array name since it is a
contant pointer to the first element. Or is that not what this "const"
is about?

Thanks,

Mark



More information about the Bzip2-devel mailing list