* [djwong-xfs:vectorized-scrub 164/368] fs/xfs/libxfs/xfs_format.h:430:4: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
@ 2022-07-12 1:04 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-07-12 1:04 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 7508 bytes --]
::::::
:::::: Manual check reason: "low confidence static check warning: fs/xfs/libxfs/xfs_format.h:430:4: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]"
::::::
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: "Darrick J. Wong" <darrick.wong@oracle.com>
CC: linux-kernel(a)vger.kernel.org
TO: "Darrick J. Wong" <djwong@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git vectorized-scrub
head: 569bd1ce4bb5c53a1b892fbe6d99693bf637063b
commit: 5b0dfa1e74cd0bce33b5ce9fabd99ee6b1895aea [164/368] xfs: create deferred log items for extent swapping
:::::: branch date: 13 days ago
:::::: commit date: 13 days ago
compiler: s390-linux-gcc (GCC) 11.3.0
reproduce (cppcheck warning):
# apt-get install cppcheck
git checkout 5b0dfa1e74cd0bce33b5ce9fabd99ee6b1895aea
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/xfs_error.c:119:9: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint]
return snprintf(buf, PAGE_SIZE, "%un",
^
>> 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:430: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:1200: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:430:4: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
XFS_SB_FEAT_INCOMPAT_LOG_SWAPEXT);
^
>> fs/xfs/libxfs/xfs_sb.c:1200:17: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
geo->flags |= XFS_FSOP_GEOM_FLAGS_ATOMIC_SWAP;
^
--
>> fs/xfs/libxfs/xfs_format.h:430: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:430:4: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
XFS_SB_FEAT_INCOMPAT_LOG_SWAPEXT);
^
>> fs/xfs/libxfs/xfs_swapext.c:131:24: warning: Using argument irec that points at uninitialized variable irec1 [ctuuninitvar]
sxi->sxi_startoff1 += irec->br_blockcount;
^
fs/xfs/libxfs/xfs_swapext.c:392: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:218: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:131:24: note: Using argument irec
sxi->sxi_startoff1 += irec->br_blockcount;
^
--
>> fs/xfs/libxfs/xfs_inode_fork.c:567:3: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg]
dp++;
^
>> fs/xfs/libxfs/xfs_format.h:430: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:430:4: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
XFS_SB_FEAT_INCOMPAT_LOG_SWAPEXT);
^
>> fs/xfs/libxfs/xfs_inode_fork.c:561:28: warning: Uninitialized variable: rec.br_startblock [uninitvar]
if (isnullstartblock(rec.br_startblock))
^
--
>> fs/xfs/libxfs/xfs_iext_tree.c:431:10: warning: Parameter 'ptr' can be declared with const [constParameter]
void *ptr)
^
>> fs/xfs/libxfs/xfs_format.h:430: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:430:4: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
XFS_SB_FEAT_INCOMPAT_LOG_SWAPEXT);
^
--
>> fs/xfs/libxfs/xfs_ialloc.c:1998:21: warning: Local variable 'pag' shadows outer argument [shadowArgument]
struct xfs_perag *pag = agbp->b_pag;
^
fs/xfs/libxfs/xfs_ialloc.c:1930:21: note: Shadowed declaration
struct xfs_perag *pag,
^
fs/xfs/libxfs/xfs_ialloc.c:1998:21: note: Shadow variable
struct xfs_perag *pag = agbp->b_pag;
^
>> fs/xfs/libxfs/xfs_format.h:430: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:430:4: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
XFS_SB_FEAT_INCOMPAT_LOG_SWAPEXT);
^
--
fs/xfs/libxfs/xfs_refcount.c:126:7: warning: Redundant initialization for 'agno'. The initialized value is overwritten before it is read. [redundantInitialization]
agno = cur->bc_ag.pag->pag_agno;
^
fs/xfs/libxfs/xfs_refcount.c:115:24: note: agno is initialized
xfs_agnumber_t agno = cur->bc_ag.pag->pag_agno;
^
fs/xfs/libxfs/xfs_refcount.c:126:7: note: agno is overwritten
agno = cur->bc_ag.pag->pag_agno;
^
>> fs/xfs/libxfs/xfs_format.h:430: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:430:4: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
XFS_SB_FEAT_INCOMPAT_LOG_SWAPEXT);
^
--
In file included from fs/xfs/libxfs/xfs_rmap.c:
>> fs/xfs/libxfs/xfs_format.h:430: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:430:4: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
XFS_SB_FEAT_INCOMPAT_LOG_SWAPEXT);
^
vim +430 fs/xfs/libxfs/xfs_format.h
bb58e6188a10f0 Christoph Hellwig 2014-11-28 426
5b0dfa1e74cd0b Darrick J. Wong 2022-06-10 427 static inline bool xfs_sb_version_haslogswapext(struct xfs_sb *sbp)
5b0dfa1e74cd0b Darrick J. Wong 2022-06-10 428 {
5b0dfa1e74cd0b Darrick J. Wong 2022-06-10 429 return xfs_sb_is_v5(sbp) && (sbp->sb_features_log_incompat &
5b0dfa1e74cd0b Darrick J. Wong 2022-06-10 @430 XFS_SB_FEAT_INCOMPAT_LOG_SWAPEXT);
5b0dfa1e74cd0b Darrick J. Wong 2022-06-10 431 }
5b0dfa1e74cd0b Darrick J. Wong 2022-06-10 432
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-07-12 1:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-12 1:04 [djwong-xfs:vectorized-scrub 164/368] fs/xfs/libxfs/xfs_format.h:430:4: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned] kernel test robot
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.