Change a test of $dstat to $line to avoid possibly emitting the sscanf warning multiple times.
Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all
Unified · Split
| @@ -4188,7 +4188,7 @@ sub process { · 4187 unmodified lines | ||
| 4188 | 4188 | # check for naked sscanf |
| 4189 | 4189 | if ($^V && $^V ge 5.10.0 && |
| 4190 | 4190 | defined $stat && |
| 4191 | − $stat =~ /\bsscanf\b/ && | |
| 4191 | + $line =~ /\bsscanf\b/ && | |
| 4192 | 4192 | ($stat !~ /$Ident\s*=\s*sscanf\s*$balanced_parens/ && |
| 4193 | 4193 | $stat !~ /\bsscanf\s*$balanced_parens\s*(?:$Compare)/ && |
| 4194 | 4194 | $stat !~ /(?:$Compare)\s*\bsscanf\s*$balanced_parens/)) { |