On 6/29/20 10:21 AM, [email protected] wrote:
Patchew URL: 
https://patchew.org/QEMU/[email protected]/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Subject: [PATCH] coverity: provide Coverity-friendly MIN_CONST and MAX_CONST
Type: series
Message-id: [email protected]

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

 From https://github.com/patchew-project/qemu
  * [new tag]         patchew/[email protected] -> 
patchew/[email protected]
Switched to a new branch 'test'
3aee0de coverity: provide Coverity-friendly MIN_CONST and MAX_CONST

=== OUTPUT BEGIN ===
WARNING: architecture specific defines should be avoided
#38: FILE: include/qemu/osdep.h:269:
+#ifdef __COVERITY__

ERROR: Macros with complex values should be enclosed in parenthesis

Obvious false positive.

#39: FILE: include/qemu/osdep.h:270:
+#define MIN_CONST(a, b) (a) < (b) ? (a) : (b)

ERROR: Macros with complex values should be enclosed in parenthesis

But this one is a real complaint.  We really do want:

#define MIN_CONST(a, b) ((a) < (b) ? (a) : (b))

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org


Reply via email to