Misleading messages from match 0.6.1-rc1

Toomas Soome <[email protected]>
Newsgroups org.kernel.vger.smatch
Message-ID <[email protected]>
Hi!

While checking illumos soource, smatch is reporting:

/code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/smatch: ../../common/fs/ufs/ufs_vnops.c:737 wrip() warn: subtract is higher precedence than shift

The code is:

http://src.illumos.org/source/xref/illumos-gate/usr/src/uts/common/fs/ufs/ufs_vnops.c#737

limit = MIN(UFS_MAXOFFSET_T, limit);

Where MIN is defined:

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

As seen from those facts, we have no subtraction nor shift. In code above, limit is unsigned 64-bit, UFS_MAXOFFSET_T is signed.


rgds,
Toomas
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.