public inbox for bzip2-devel@sourceware.org
 help / color / mirror / Atom feed
From: Carlo Bramini <carlo.bramix@libero.it>
To: "bzip2-devel@sourceware.org" <bzip2-devel@sourceware.org>
Subject: Declare bzerrorstrings[] to be a const object.
Date: Tue, 26 Apr 2022 16:33:22 +0200 (CEST)	[thread overview]
Message-ID: <434364370.952076.1650983602854@mail1.libero.it> (raw)

[-- Attachment #1: Type: text/plain, Size: 345 bytes --]

Hello,
by looking the content of the map file, I discovered that bzerrorstrings[] is not const.
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.

Sincerely,

Carlo Bramini.

[-- Attachment #2: bzlib.c.patch --]
[-- Type: application/octet-stream, Size: 337 bytes --]

diff --git a/bzlib.c b/bzlib.c
index 2178655..752d5a0 100644
--- a/bzlib.c
+++ b/bzlib.c
@@ -1536,7 +1536,7 @@ void BZ_API(BZ2_bzclose) (BZFILE* b)
 /*--
    return last error code 
 --*/
-static const char *bzerrorstrings[] = {
+static const char * const bzerrorstrings[] = {
        "OK"
       ,"SEQUENCE_ERROR"
       ,"PARAM_ERROR"

             reply	other threads:[~2022-04-26 14:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-26 14:33 Carlo Bramini [this message]
2022-04-26 19:35 ` Mark Wielaard
2022-04-27  9:21   ` Carlo Bramini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=434364370.952076.1650983602854@mail1.libero.it \
    --to=carlo.bramix@libero.it \
    --cc=bzip2-devel@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).