From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com
Subject: [djwong-xfs:xfile-page-caching 277/327] fs/xfs/libxfs/xfs_format.h:431:4: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
Date: Sun, 18 Dec 2022 13:24:59 +0800 [thread overview]
Message-ID: <202212181333.QFpnoBLE-lkp@intel.com> (raw)
::::::
:::::: Manual check reason: "low confidence static check warning: fs/xfs/libxfs/xfs_format.h:431:4: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: "Darrick J. Wong" <darrick.wong@oracle.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git xfile-page-caching
head: d1250c38a00309ecfccd142acc124ec461a777bc
commit: 4d4eab765648436066127e90cdb092bc8899a07d [277/327] xfs: create deferred log items for extent swapping
:::::: branch date: 10 hours ago
:::::: commit date: 10 hours ago
compiler: loongarch64-linux-gcc (GCC) 12.1.0
reproduce (cppcheck warning):
# apt-get install cppcheck
git checkout 4d4eab765648436066127e90cdb092bc8899a07d
cppcheck --quiet --enable=style,performance,portability --template=gcc FILE
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
fs/xfs/libxfs/xfs_sb.c:470:21: warning: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition]
if (!!sbp->sb_unit ^ has_dalign) {
^
>> fs/xfs/libxfs/xfs_format.h:431:4: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
XFS_SB_FEAT_INCOMPAT_LOG_SWAPEXT);
^
>> fs/xfs/libxfs/xfs_sb.c:1202:17: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
geo->flags |= XFS_FSOP_GEOM_FLAGS_ATOMIC_SWAP;
^
>> fs/xfs/libxfs/xfs_format.h:431:4: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
XFS_SB_FEAT_INCOMPAT_LOG_SWAPEXT);
^
>> fs/xfs/libxfs/xfs_sb.c:1202:17: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
geo->flags |= XFS_FSOP_GEOM_FLAGS_ATOMIC_SWAP;
^
--
>> fs/xfs/libxfs/xfs_format.h:431:4: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
XFS_SB_FEAT_INCOMPAT_LOG_SWAPEXT);
^
>> fs/xfs/libxfs/xfs_format.h:431:4: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
XFS_SB_FEAT_INCOMPAT_LOG_SWAPEXT);
^
>> fs/xfs/libxfs/xfs_swapext.c:132:24: warning: Using argument irec that points at uninitialized variable irec1 [ctuuninitvar]
sxi->sxi_startoff1 += irec->br_blockcount;
^
fs/xfs/libxfs/xfs_swapext.c:398:36: note: Calling function xfs_swapext_find_mappings, 2nd argument is uninitialized
error = xfs_swapext_find_mappings(sxi, &irec1, &irec2, NULL);
^
fs/xfs/libxfs/xfs_swapext.c:219:38: note: Calling function sxi_advance, 2nd argument is uninitialized
for (; sxi_has_more_swap_work(sxi); sxi_advance(sxi, irec1)) {
^
fs/xfs/libxfs/xfs_swapext.c:132:24: note: Using argument irec
sxi->sxi_startoff1 += irec->br_blockcount;
^
--
fs/xfs/libxfs/xfs_da_btree.c:2430:4: warning: 'continue' is redundant since it is the last statement in a loop. [redundantContinue]
continue;
^
fs/xfs/libxfs/xfs_da_btree.c:2451:4: warning: 'continue' is redundant since it is the last statement in a loop. [redundantContinue]
continue;
^
>> fs/xfs/libxfs/xfs_format.h:431:4: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
XFS_SB_FEAT_INCOMPAT_LOG_SWAPEXT);
^
>> fs/xfs/libxfs/xfs_format.h:431:4: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
XFS_SB_FEAT_INCOMPAT_LOG_SWAPEXT);
^
vim +431 fs/xfs/libxfs/xfs_format.h
bb58e6188a10f0 Christoph Hellwig 2014-11-28 427
4d4eab76564843 Darrick J. Wong 2022-07-14 428 static inline bool xfs_sb_version_haslogswapext(struct xfs_sb *sbp)
4d4eab76564843 Darrick J. Wong 2022-07-14 429 {
4d4eab76564843 Darrick J. Wong 2022-07-14 430 return xfs_sb_is_v5(sbp) && (sbp->sb_features_log_incompat &
4d4eab76564843 Darrick J. Wong 2022-07-14 @431 XFS_SB_FEAT_INCOMPAT_LOG_SWAPEXT);
4d4eab76564843 Darrick J. Wong 2022-07-14 432 }
4d4eab76564843 Darrick J. Wong 2022-07-14 433
--
0-DAY CI Kernel Test Service
https://01.org/lkp
reply other threads:[~2022-12-18 5:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202212181333.QFpnoBLE-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.