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
modules
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
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
analyse-locks-simpletrace.py scripts: Remove unused python imports 2019-01-17 17:52:40 -02:00
analyze-inclusions
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
clean-includes
cleanup-trace-events.pl
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
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
feature_to_c.sh
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
hxtool
make_device_config.sh
make-release make-release: add skiboot .version file 2018-11-15 13:03:57 +00:00
qapi-gen.py
qemu-binfmt-conf.sh qemu-binfmt-conf.sh: add x86_64 target 2018-08-17 13:56:33 +02:00
qemu-gdb.py
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
replay-dump.py scripts/replay-dump.py: fix utf-8 mangling 2019-01-17 17:52:40 -02:00
shaderinclude.pl
show-fixed-bugs.sh show-fixed-bugs.sh: Modern shell scripting (use $() instead of ``) 2018-10-16 18:34:19 +02:00
signrom.py
simpletrace.py scripts: Remove unused python imports 2019-01-17 17:52:40 -02:00
switch-timer-api
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