Skip to content

Commit 048e02a

Browse files
behlendorfckane
authored andcommitted
Suppress cppcheck invalidSyntax warninigs
For some reason cppcheck 1.90 is generating an invalidSyntax warning when the BF64_SET macro is used in the zstream source. The same warning is not reported by cppcheck 2.3, nor is their any evident problem with the expanded macro. This appears to be an issue with this version of cppcheck. This commit annotates the source to suppress the warning. Signed-off-by: Brian Behlendorf <[email protected]> Closes openzfs#11700
1 parent ee2253b commit 048e02a

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

cmd/zstream/zstream_redup.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ zfs_redup_stream(int infd, int outfd, boolean_t verbose)
248248
fflags = DMU_GET_FEATUREFLAGS(drrb->drr_versioninfo);
249249
fflags &= ~(DMU_BACKUP_FEATURE_DEDUP |
250250
DMU_BACKUP_FEATURE_DEDUPPROPS);
251+
/* cppcheck-suppress syntaxError */
251252
DMU_SET_FEATUREFLAGS(drrb->drr_versioninfo, fflags);
252253

253254
int sz = drr->drr_payloadlen;

include/sys/dmu_redact.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ redact_block_get_size(redact_block_phys_t *rbp)
3939
static inline void
4040
redact_block_set_size(redact_block_phys_t *rbp, uint64_t size)
4141
{
42+
/* cppcheck-suppress syntaxError */
4243
BF64_SET_SB((rbp)->rbp_size_count, 48, 16, SPA_MINBLOCKSHIFT, 0, size);
4344
}
4445

@@ -51,6 +52,7 @@ redact_block_get_count(redact_block_phys_t *rbp)
5152
static inline void
5253
redact_block_set_count(redact_block_phys_t *rbp, uint64_t count)
5354
{
55+
/* cppcheck-suppress syntaxError */
5456
BF64_SET_SB((rbp)->rbp_size_count, 0, 48, 0, 1, count);
5557
}
5658

0 commit comments

Comments
 (0)