All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Jeffery <andrew@aj.id.au>
To: joel@jms.id.au
Cc: Andrew Jeffery <andrew@aj.id.au>, openbmc@lists.ozlabs.org
Subject: [PATCH u-boot 1/4] checkpatch: Fix unescaped brace warning
Date: Tue, 24 Jul 2018 00:28:37 +0930	[thread overview]
Message-ID: <20180723145840.17856-2-andrew@aj.id.au> (raw)
In-Reply-To: <20180723145840.17856-1-andrew@aj.id.au>

Running checkpatch using Ubuntu 18.04's packaged perl
(5.26.1-6ubuntu0.1) gave the following output:

    Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.30), passed through in regex; marked by <-- HERE in m/^(\+.*(?:do|\))){ <-- HERE / at ./scripts/checkpatch.pl line 3267

Escape the brace to avoid the warning.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 24831b3166e2..d38369638c6a 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3264,7 +3264,7 @@ sub process {
 			if (ERROR("SPACING",
 				  "space required before the open brace '{'\n" . $herecurr) &&
 			    $fix) {
-				$fixed[$linenr - 1] =~ s/^(\+.*(?:do|\))){/$1 {/;
+				$fixed[$linenr - 1] =~ s/^(\+.*(?:do|\)))\{/$1 {/;
 			}
 		}
 
-- 
2.17.1

  reply	other threads:[~2018-07-23 14:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-23 14:58 [PATCH u-boot 0/4] Cleanups and disable unnecessary features Andrew Jeffery
2018-07-23 14:58 ` Andrew Jeffery [this message]
2018-07-23 14:58 ` [PATCH u-boot 2/4] ast-g4: Fix typo in board_init() comment Andrew Jeffery
2018-07-23 14:58 ` [PATCH u-boot 3/4] arch-aspeed: Make AHBC and SDMC header guards unique Andrew Jeffery
2018-07-23 14:58 ` [PATCH u-boot 4/4] aspeed: Disable unnecessary features Andrew Jeffery
2018-09-14 23:22   ` Kun Yi
2019-02-11 23:32     ` Andrew Jeffery

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=20180723145840.17856-2-andrew@aj.id.au \
    --to=andrew@aj.id.au \
    --cc=joel@jms.id.au \
    --cc=openbmc@lists.ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.