mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
Suppress Clang Static Analyzer warning about SNPRINTF_BLKPTR()
Clang's static analyzer pointed out that if we can pass a -1 array index to copyname[copies] if there are no valid DVAs. This is an absurd situation, but it suggests that we are missing an assertion, so we add it. 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
a4240a8ac7
commit
0b831cabc6
@ -663,6 +663,7 @@ typedef struct blkptr {
|
||||
(u_longlong_t)DVA_GET_ASIZE(dva), \
|
||||
ws); \
|
||||
} \
|
||||
ASSERT3S(copies, >, 0); \
|
||||
if (BP_IS_ENCRYPTED(bp)) { \
|
||||
len += func(buf + len, size - len, \
|
||||
"salt=%llx iv=%llx:%llx%c", \
|
||||
|
Loading…
Reference in New Issue
Block a user