From cb937262aa71ee3d610900d7f14eef28e9f11dd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Sun, 10 Oct 2021 20:41:33 +0200 Subject: [PATCH] Remove static initialization as error --- checkpatch.pl | 9 --------- 1 file changed, 9 deletions(-) diff --git a/checkpatch.pl b/checkpatch.pl index 3c9fdf6..5d56fe6 100755 --- a/checkpatch.pl +++ b/checkpatch.pl @@ -3820,15 +3820,6 @@ sub process { $fixed[$fixlinenr] =~ s/(^.$Type\s*$Ident(?:\s+$Modifier)*)\s*=\s*$zero_initializer\s*;/$1;/; } } -# check for static initialisers. - if ($line =~ /^\+.*\bstatic\s.*=\s*($zero_initializer)\s*;/) { - if (ERROR("INITIALISED_STATIC", - "do not initialise statics to $1\n" . - $herecurr) && - $fix) { - $fixed[$fixlinenr] =~ s/(\bstatic\s.*?)\s*=\s*$zero_initializer\s*;/$1;/; - } - } # check for misordered declarations of char/short/int/long with signed/unsigned while ($sline =~ m{(\b$TypeMisordered\b)}g) {