Compare commits
2 Commits
3a58e3dd1c
...
master
Author | SHA1 | Date | |
---|---|---|---|
aeb2707d80 | |||
cb937262aa |
@@ -3820,15 +3820,6 @@ sub process {
|
|||||||
$fixed[$fixlinenr] =~ s/(^.$Type\s*$Ident(?:\s+$Modifier)*)\s*=\s*$zero_initializer\s*;/$1;/;
|
$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
|
# check for misordered declarations of char/short/int/long with signed/unsigned
|
||||||
while ($sline =~ m{(\b$TypeMisordered\b)}g) {
|
while ($sline =~ m{(\b$TypeMisordered\b)}g) {
|
||||||
@@ -5338,10 +5329,10 @@ sub process {
|
|||||||
|
|
||||||
# no volatiles please
|
# no volatiles please
|
||||||
my $asm_volatile = qr{\b(__asm__|asm)\s+(__volatile__|volatile)\b};
|
my $asm_volatile = qr{\b(__asm__|asm)\s+(__volatile__|volatile)\b};
|
||||||
if ($line =~ /\bvolatile\b/ && $line !~ /$asm_volatile/) {
|
#if ($line =~ /\bvolatile\b/ && $line !~ /$asm_volatile/) {
|
||||||
WARN("VOLATILE",
|
# WARN("VOLATILE",
|
||||||
"Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst\n" . $herecurr);
|
# "Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst\n" . $herecurr);
|
||||||
}
|
#}
|
||||||
|
|
||||||
# Check for user-visible strings broken across lines, which breaks the ability
|
# Check for user-visible strings broken across lines, which breaks the ability
|
||||||
# to grep for the string. Make exceptions when the previous string ends in a
|
# to grep for the string. Make exceptions when the previous string ends in a
|
||||||
|
Reference in New Issue
Block a user