From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (gnu.wildebeest.org [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id D8B653858C83 for ; Tue, 26 Apr 2022 19:35:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D8B653858C83 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from reform (deer0x0b.wildebeest.org [172.31.17.141]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 68863302BBED; Tue, 26 Apr 2022 21:35:02 +0200 (CEST) Received: by reform (Postfix, from userid 1000) id 81A4C2E8046D; Tue, 26 Apr 2022 21:35:01 +0200 (CEST) Date: Tue, 26 Apr 2022 21:35:01 +0200 From: Mark Wielaard To: Carlo Bramini Cc: "bzip2-devel@sourceware.org" Subject: Re: Declare bzerrorstrings[] to be a const object. Message-ID: References: <434364370.952076.1650983602854@mail1.libero.it> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <434364370.952076.1650983602854@mail1.libero.it> X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: bzip2-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Bzip2-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2022 19:35:06 -0000 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