mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-24 18:39:34 +03:00
Suppress Clang Static Analyzer false positive in the AVL tree code.
This has been filed as llvm/llvm-project#60694. Switching from a copy through a C pointer dereference to an explicit memcpy() is a workaround that prevents a false positive. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Closes #14575
This commit is contained in:
parent
8b72dfed11
commit
a4240a8ac7
@ -108,6 +108,10 @@
|
||||
#include <sys/cmn_err.h>
|
||||
#include <sys/mod.h>
|
||||
|
||||
#ifndef _KERNEL
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Walk from one node to the previous valued node (ie. an infix walk
|
||||
* towards the left). At any given node we do one of 2 things:
|
||||
@ -695,7 +699,7 @@ avl_remove(avl_tree_t *tree, void *data)
|
||||
*/
|
||||
tmp = *node;
|
||||
|
||||
*node = *delete;
|
||||
memcpy(node, delete, sizeof (*node));
|
||||
if (node->avl_child[left] == node)
|
||||
node->avl_child[left] = &tmp;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user