mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Update for cppcheck v1.80
Resolve new warnings and errors from cppcheck v1.80. * [lib/libshare/libshare.c:543]: (warning) Possible null pointer dereference: protocol * [lib/libzfs/libzfs_dataset.c:2323]: (warning) Possible null pointer dereference: srctype * [lib/libzfs/libzfs_import.c:318]: (error) Uninitialized variable: link * [module/zfs/abd.c:353]: (error) Uninitialized variable: sg * [module/zfs/abd.c:353]: (error) Uninitialized variable: i * [module/zfs/abd.c:385]: (error) Uninitialized variable: sg * [module/zfs/abd.c:385]: (error) Uninitialized variable: i * [module/zfs/abd.c:553]: (error) Uninitialized variable: i * [module/zfs/abd.c:553]: (error) Uninitialized variable: sg * [module/zfs/abd.c:763]: (error) Uninitialized variable: i * [module/zfs/abd.c:763]: (error) Uninitialized variable: sg * [module/zfs/abd.c:305]: (error) Uninitialized variable: tmp_page * [module/zfs/zpl_xattr.c:342]: (warning) Possible null pointer dereference: value * [module/zfs/zvol.c:208]: (error) Uninitialized variable: p Convert the following suppression to inline. * [module/zfs/zfs_vnops.c:840]: (error) Possible null pointer dereference: aiov Exclude HAVE_UIO_ZEROCOPY and HAVE_DNLC from analysis since these macro's will never be defined until this functionality is implemented. Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #6879
This commit is contained in:
committed by
Tony Hutter
parent
7a8bef3983
commit
aebc5df418
@@ -2244,8 +2244,10 @@ static void
|
||||
get_source(zfs_handle_t *zhp, zprop_source_t *srctype, char *source,
|
||||
char *statbuf, size_t statlen)
|
||||
{
|
||||
if (statbuf == NULL || *srctype == ZPROP_SRC_TEMPORARY)
|
||||
if (statbuf == NULL ||
|
||||
srctype == NULL || *srctype == ZPROP_SRC_TEMPORARY) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (source == NULL) {
|
||||
*srctype = ZPROP_SRC_NONE;
|
||||
|
||||
@@ -309,7 +309,7 @@ zpool_label_disk_wait(char *path, int timeout_ms)
|
||||
dev = udev_device_new_from_subsystem_sysname(udev,
|
||||
"block", sysname);
|
||||
if ((dev != NULL) && udev_device_is_ready(dev)) {
|
||||
struct udev_list_entry *links, *link;
|
||||
struct udev_list_entry *links, *link = NULL;
|
||||
|
||||
ret = 0;
|
||||
links = udev_device_get_devlinks_list_entry(dev);
|
||||
|
||||
Reference in New Issue
Block a user