Merge pull request #1771 from matt335672/cppcheck-new
Bump cppcheck version to 2.3
This commit is contained in:
commit
c76c580441
5
.github/workflows/build.yml
vendored
5
.github/workflows/build.yml
vendored
@ -126,8 +126,8 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CC: gcc
|
CC: gcc
|
||||||
# This is required to use a version of cppcheck other than that
|
# This is required to use a version of cppcheck other than that
|
||||||
# suplied with the operating system
|
# supplied with the operating system
|
||||||
CPPCHECK_VER: 2.1
|
CPPCHECK_VER: 2.3
|
||||||
CPPCHECK_REPO: https://github.com/danmar/cppcheck.git
|
CPPCHECK_REPO: https://github.com/danmar/cppcheck.git
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@ -142,4 +142,3 @@ jobs:
|
|||||||
- run: ./bootstrap
|
- run: ./bootstrap
|
||||||
- run: scripts/install_cppcheck.sh $CPPCHECK_REPO $CPPCHECK_VER
|
- run: scripts/install_cppcheck.sh $CPPCHECK_REPO $CPPCHECK_VER
|
||||||
- run: scripts/run_cppcheck.sh -v $CPPCHECK_VER
|
- run: scripts/run_cppcheck.sh -v $CPPCHECK_VER
|
||||||
|
|
@ -1799,7 +1799,10 @@ validate (region_type_t * badreg)
|
|||||||
*badreg = ri[0].reg;
|
*badreg = ri[0].reg;
|
||||||
|
|
||||||
if (ri != stack_regions)
|
if (ri != stack_regions)
|
||||||
|
{
|
||||||
|
/* cppcheck-suppress autovarInvalidDeallocation */
|
||||||
free (ri);
|
free (ri);
|
||||||
|
}
|
||||||
|
|
||||||
GOOD (badreg);
|
GOOD (badreg);
|
||||||
return ret;
|
return ret;
|
||||||
@ -1809,7 +1812,10 @@ bail:
|
|||||||
FREE_DATA (&ri[i].reg);
|
FREE_DATA (&ri[i].reg);
|
||||||
|
|
||||||
if (ri != stack_regions)
|
if (ri != stack_regions)
|
||||||
|
{
|
||||||
|
/* cppcheck-suppress autovarInvalidDeallocation */
|
||||||
free (ri);
|
free (ri);
|
||||||
|
}
|
||||||
|
|
||||||
return pixman_break (badreg);
|
return pixman_break (badreg);
|
||||||
}
|
}
|
||||||
|
@ -129,6 +129,12 @@ fi
|
|||||||
make_args="FILESDIR=$FILESDIR PREFIX=$FILESDIR CFGDIR=$FILESDIR"
|
make_args="FILESDIR=$FILESDIR PREFIX=$FILESDIR CFGDIR=$FILESDIR"
|
||||||
;;
|
;;
|
||||||
*) make_args="FILESDIR=$FILESDIR PREFIX=$FILESDIR USE_Z3=yes"
|
*) make_args="FILESDIR=$FILESDIR PREFIX=$FILESDIR USE_Z3=yes"
|
||||||
|
# Check that the Z3 development files appear to be installed
|
||||||
|
# before trying to create z3_version.h. Otherwise we may
|
||||||
|
# mislead the user as to what needs to be done.
|
||||||
|
if [ ! -f /usr/include/z3.h ]; then
|
||||||
|
echo "** libz3-dev (or equivalent) does not appear to be installed" >&2
|
||||||
|
fi
|
||||||
if [ ! -f /usr/include/z3_version.h ]; then
|
if [ ! -f /usr/include/z3_version.h ]; then
|
||||||
create_z3_version_h
|
create_z3_version_h
|
||||||
fi
|
fi
|
||||||
|
@ -273,7 +273,11 @@ xfs_create_xfs_fs(mode_t umask, uid_t uid, gid_t gid)
|
|||||||
xfs->free_list = NULL;
|
xfs->free_list = NULL;
|
||||||
xfs->generation = 1;
|
xfs->generation = 1;
|
||||||
|
|
||||||
|
/* xfs->inode_table check should be superfluous here, but it
|
||||||
|
* prevents cppcheck 2.2/2.3 generating a false positive nullPointer
|
||||||
|
* report */
|
||||||
if (!grow_xfs(xfs, INODE_TABLE_ALLOCATION_INITIAL) ||
|
if (!grow_xfs(xfs, INODE_TABLE_ALLOCATION_INITIAL) ||
|
||||||
|
xfs->inode_table == NULL ||
|
||||||
(xino1 = g_new0(XFS_INODE_ALL, 1)) == NULL ||
|
(xino1 = g_new0(XFS_INODE_ALL, 1)) == NULL ||
|
||||||
(xino2 = g_new0(XFS_INODE_ALL, 1)) == NULL)
|
(xino2 = g_new0(XFS_INODE_ALL, 1)) == NULL)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user