Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37866365
en ru br
ALT Linux repositórios
S:0.0.2.g9f9884083831-alt1

Group :: Shelss
RPM: mrsh

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: 0001-parser-make-an-auto-const-char-array-static.patch
Download


From f0a7349faf4a0e752302c8896aca5033dcd54f8a Mon Sep 17 00:00:00 2001
From: Arseny Maslennikov <arseny@altlinux.org>
Date: Sat, 10 Apr 2021 17:33:05 +0300
Subject: [PATCH] parser: fix build with gcc 10's -Wformat-truncation
To: ~emersion/mrsh-dev@lists.sr.ht
There is no reason for the array to not be static, and this qualifier
prevents type erasure so this file can be compiled with
-Werror=format-truncation.
---
 parser/program.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/parser/program.c b/parser/program.c
index 921f7cf..6214751 100644
--- a/parser/program.c
+++ b/parser/program.c
@@ -875,7 +875,7 @@ static struct mrsh_function_definition *function_definition(
 }
 
 static bool unspecified_word(struct mrsh_parser *parser) {
-	const char *const reserved[] = {
+	static const char *const reserved[] = {
 		"[[",
 		"]]",
 		"function",
-- 
2.29.3
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009