提交 e20e718c 编写于 作者: P Paolo Bonzini

checkpatch: tweak "struct should normally be const" warning

Avoid triggering on

    typedef struct BlockJobDriver BlockJobDriver;

or

    struct BlockJobDriver {

Cc: John Snow <jsnow@redhat.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 39542105
......@@ -2498,8 +2498,8 @@ sub process {
VMStateDescription|
VMStateInfo}x;
if ($line !~ /\bconst\b/ &&
$line =~ /\b($struct_ops)\b/) {
ERROR("struct $1 should normally be const\n" .
$line =~ /\b($struct_ops)\b.*=/) {
ERROR("initializer for struct $1 should normally be const\n" .
$herecurr);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册