qemu-e2k/scripts
Peter Maydell b94e809d3e checkpatch: Don't emit spurious warnings about block comments
In checkpatch we attempt to check for and warn about
block comments which start with /* or /** followed by a
non-blank. Unfortunately a bug in the regex meant that
we would incorrectly warn about comments starting with
"/**" with no following text:

  git show 9813dc6ac3954d58ba16b3920556f106f97e1c67|./scripts/checkpatch.pl -
  WARNING: Block comments use a leading /* on a separate line
  #34: FILE: tests/libqtest.h:233:
  +/**

The sequence "/\*\*?" was intended to match either "/*" or "/**",
but Perl's semantics for '?' allow it to backtrack and try the
"matches 0 chars" option if the "matches 1 char" choice leads to
a failure of the rest of the regex to match.  Switch to "/\*\*?+"
which uses what perlre(1) calls the "possessive" quantifier form:
this means that if it matches the "/**" string it will not later
backtrack to matching just the "/*" prefix.

The other end of the regex is also wrong: it is attempting
to check for "/* or /** followed by something that isn't
just whitespace", but [ \t]*.+[ \t]* will match on pure
whitespace. This is less significant but means that a line
with just a comment-starter followed by trailing whitespace
will generate an incorrect warning about block comment style
as well as the correct error about trailing whitespace which
a different checkpatch test emits.

Fixes: 8c06fbdf36 ("scripts/checkpatch.pl: Enforce multiline comment syntax")
Reported-by: Thomas Huth <thuth@redhat.com>
Reported-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20190118165050.22270-1-peter.maydell@linaro.org
2019-01-29 11:46:05 +00:00
..
coccinelle qemu-iotests: convert `pwd` and $(pwd) to $PWD 2018-11-19 10:08:19 -06:00
kvm python: futurize -f libfuturize.fixes.fix_print_with_import 2018-06-08 14:39:24 -03:00
modules scripts: Allow block module to not define BlockDriver 2016-10-07 14:14:06 +02:00
qapi qapi: Eliminate indirection through qmp_event_get_func_emit() 2019-01-24 10:01:05 +01:00
qemu-guest-agent qemu-guest-agent: freeze-hook to ignore dpkg files as well 2018-08-23 18:46:25 +02:00
qemugdb scripts/qemu-gdb/timers.py: define encoding in header comment 2018-02-05 13:54:39 +01:00
qmp qmp-shell: learn to send commands with quoted arguments 2018-08-15 07:24:22 +02:00
tracetool scripts: Remove unused python imports 2019-01-17 17:52:40 -02:00
travis travis: add gcovr summary for GCOV build 2018-07-05 15:59:41 +01:00
analyse-9p-simpletrace.py python: futurize -f libfuturize.fixes.fix_print_with_import 2018-06-08 14:39:24 -03:00
analyse-locks-simpletrace.py scripts: Remove unused python imports 2019-01-17 17:52:40 -02:00
analyze-inclusions Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
analyze-migration.py scripts: Remove unused python imports 2019-01-17 17:52:40 -02:00
archive-source.sh scripts/archive-source: include softfloat tests 2019-01-23 08:30:01 +00:00
checkpatch.pl checkpatch: Don't emit spurious warnings about block comments 2019-01-29 11:46:05 +00:00
clean-header-guards.pl scripts: Switch to more portable Perl shebang 2017-05-10 10:19:24 +03:00
clean-includes scripts/clean-includes: added duplicate #include check 2016-10-28 18:17:23 +03:00
cleanup-trace-events.pl scripts: Switch to more portable Perl shebang 2017-05-10 10:19:24 +03:00
cocci-macro-file.h qemu/queue.h: reimplement QTAILQ without pointer-to-pointers 2019-01-11 15:46:55 +01:00
coverity-model.c coverity-model: Fix replay_get_byte() 2018-07-05 15:09:52 +02:00
create_config Revert "Makefile: Rename TARGET_DIRS to TARGET_LIST" 2018-07-05 15:59:41 +01:00
decodetree.py decodetree: re.fullmatch was added in 3.4 2019-01-25 11:41:42 -02:00
device-crash-test device-crash-test: Python 3 compatibility fix 2019-01-25 11:41:33 -02:00
disas-objdump.pl scripts: Switch to more portable Perl shebang 2017-05-10 10:19:24 +03:00
dump-guest-memory.py scripts/dump-guest-memory: Synchronize with guest_phys_blocks_region_add 2018-11-06 21:35:05 +01:00
extract-vsssdk-headers Add a script to extract VSS SDK headers on POSIX system 2013-09-09 14:17:56 -05:00
feature_to_c.sh scripts: Use $(..) instead of deprecated `..` 2016-06-07 18:19:23 +03:00
fix-multiline-comments.sh scripts: add script to convert multiline comments into 4-line format 2019-01-11 15:46:55 +01:00
get_maintainer.pl get_maintainer: use 'https://' instead of 'git://' 2018-11-12 11:26:02 +00:00
git-submodule.sh git-submodule.sh: Modern shell scripting (use $() instead of ``) 2018-10-16 18:34:19 +02:00
git.orderfile add scripts/git.orderfile 2017-07-20 09:56:41 +02:00
hxtool qemu-options: Remove stray colons from output of --help 2017-12-20 09:04:27 +01:00
make-release make-release: add skiboot .version file 2018-11-15 13:03:57 +00:00
make_device_config.sh scripts: Use $(..) instead of deprecated `..` 2016-06-07 18:19:23 +03:00
qapi-gen.py qapi: Lift error reporting from QAPISchema.__init__() to callers 2018-03-02 13:14:09 -06:00
qemu-binfmt-conf.sh qemu-binfmt-conf.sh: add x86_64 target 2018-08-17 13:56:33 +02:00
qemu-gdb.py scripts/qemu-gdb/timers.py: new helper to dump timer state 2018-01-16 14:54:51 +01:00
qemu.py qemu.py: Fix error message when qemu dies from signal 2019-01-17 17:52:40 -02:00
qtest.py iotests: Use Python byte strings where appropriate 2018-10-30 21:11:52 -03:00
refresh-pxe-roms.sh roms: rewrite scripts/refresh-pxe-roms.sh 2013-09-30 09:44:35 +02:00
replay-dump.py scripts/replay-dump.py: fix utf-8 mangling 2019-01-17 17:52:40 -02:00
shaderinclude.pl scripts: Switch to more portable Perl shebang 2017-05-10 10:19:24 +03:00
show-fixed-bugs.sh show-fixed-bugs.sh: Modern shell scripting (use $() instead of ``) 2018-10-16 18:34:19 +02:00
signrom.py python: futurize -f libfuturize.fixes.fix_print_with_import 2018-06-08 14:39:24 -03:00
simpletrace.py scripts: Remove unused python imports 2019-01-17 17:52:40 -02:00
switch-timer-api scripts: Switch to more portable Perl shebang 2017-05-10 10:19:24 +03:00
tap-driver.pl test: replace gtester with a TAP driver 2019-01-11 15:46:52 +01:00
tap-merge.pl test: replace gtester with a TAP driver 2019-01-11 15:46:52 +01:00
texi2pod.pl maint: Allow for EXAMPLES in texi2pod 2019-01-21 15:49:51 -06:00
tracetool.py scripts: Remove unused python imports 2019-01-17 17:52:40 -02:00
update-linux-headers.sh update-linux-headers.sh: add qemu_fw_cfg.h 2018-08-23 18:46:25 +02:00
vmstate-static-checker.py python: futurize -f libfuturize.fixes.fix_next_call 2018-06-08 14:39:24 -03:00