From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id GKOYJHj6nGDQngAAgWs5BA (envelope-from ) for ; Thu, 13 May 2021 12:07:52 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id cDYgIHj6nGCgdQAAbx9fmQ (envelope-from ) for ; Thu, 13 May 2021 10:07:52 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 13ECE8896 for ; Thu, 13 May 2021 12:07:52 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id B450027E12; Thu, 13 May 2021 06:07:29 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id 1CE7D2717B for ; Thu, 13 May 2021 06:07:19 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id 1727D60018; Thu, 13 May 2021 06:07:19 -0400 (EDT) Received: (nullmailer pid 1460740 invoked by uid 1000); Thu, 13 May 2021 10:07:13 -0000 From: David Bremner To: notmuch@notmuchmail.org Cc: David Bremner Subject: [PATCH 6/7] CLI: make static message strings const Date: Thu, 13 May 2021 07:07:09 -0300 Message-Id: <20210513100710.1460566-7-david@tethera.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210513100710.1460566-1-david@tethera.net> References: <20210513100710.1460566-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: JY7U7XHWIK3YKNT42SYFKVCFPPP5HVAK X-Message-ID-Hash: JY7U7XHWIK3YKNT42SYFKVCFPPP5HVAK X-MailFrom: bremner@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1620900472; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=V05fwsvSWaZFzaSP28fOMktlrJNBf8bs08E+2gaFqOo=; b=ZW397bROv3KR9TjLyaFG7RvOyftXjIGcx93/ReN6WIFrEOEOvGHzGcsvTVjx4eWI3B9eZY nHROWkmoLsrKBcfLZ5r/OM9fVWSbjImejIGRuTc9DvoE7JcXBN9xUlf55gEI1+3UkvGQFu xNk0EbSzKgLK1vcl4hyUQWVkPBFcevNGIBDGMY/g8oE3te957C+JTp41PeBJZHZnxejZW3 ZeXtGmeVmcMCYtprC3ozQKz8V11+boZ5Tr8UPl572d6Ysd8Z46JRoB4bE7NwSz20YQ7soG 0vxmE0te/ehLLHWYf6c1BiTdtZREQ9+SQttui3LJBf5G73jbOrGMG66p3xFXCA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620900472; a=rsa-sha256; cv=none; b=MUKe+W6yiH5PQvZGxPG07wG2MjAd8Lm9OJlCQ1+KRwx+RdNx20u4TQc4zdDVHBzvv7EYPO ucTE20v0reWrb/UnybE/i3BPrzfKaIuOY6y6D3n64z8GnDM2P6xbpWRJ2Mqpth7rQFLB7X BgtdnF6XfUS9Ppl6LThV/ZDyQfXVo1owcA7zWH5Kz8FMMTEvuq0o/dvbUZh0cZHJAQ50b6 80bHt13DE1iuw1qnV3LXcfQWCVT79mzwij56uS1GIatu1ai/cRoN0OsoOT3f5ChxZRmDKy KMIiM6oJLH7LryOiFiDpboBZ3M3i/NHICCcWfw1ImmAsd5S1qhGP9uJfCM3T8g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: 0.43 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 13ECE8896 X-Spam-Score: 0.43 X-Migadu-Scanner: scn0.migadu.com X-TUID: P7BRbhdNF343 This is both a bit clearer and avoids the possibility of modification. --- notmuch-insert.c | 2 +- notmuch-tag.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/notmuch-insert.c b/notmuch-insert.c index 00c00468..e3d87e4a 100644 --- a/notmuch-insert.c +++ b/notmuch-insert.c @@ -34,7 +34,7 @@ static volatile sig_atomic_t interrupted; static void handle_sigint (unused (int sig)) { - static char msg[] = "Stopping... \n"; + static const char msg[] = "Stopping... \n"; /* This write is "opportunistic", so it's okay to ignore the * result. It is not required for correctness, and if it does diff --git a/notmuch-tag.c b/notmuch-tag.c index 667a75d6..de428c8e 100644 --- a/notmuch-tag.c +++ b/notmuch-tag.c @@ -27,7 +27,7 @@ static volatile sig_atomic_t interrupted; static void handle_sigint (unused (int sig)) { - static char msg[] = "Stopping... \n"; + static const char msg[] = "Stopping... \n"; /* This write is "opportunistic", so it's okay to ignore the * result. It is not required for correctness, and if it does -- 2.30.2