mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-18 08:49:29 -04:00
chore: add more clang-tidy diagnostic suppressions
This commit is contained in:
parent
c3491befa1
commit
8f9e3cde23
@ -61,6 +61,7 @@ std::string get_jemalloc_version() {
|
||||
j = JEMALLOC_VERSION;
|
||||
#else
|
||||
size_t s = sizeof(j);
|
||||
// NOLINTNEXTLINE(bugprone-multi-level-implicit-pointer-conversion)
|
||||
::mallctl("version", &j, &s, nullptr, 0);
|
||||
#endif
|
||||
std::string rv{j};
|
||||
|
@ -113,7 +113,7 @@ try_get_block_decompressor(std::shared_ptr<mmif> mm, fs_section const& sec) {
|
||||
if (sec.check_fast(*mm)) {
|
||||
try {
|
||||
return get_block_decompressor(std::move(mm), sec);
|
||||
} catch (std::exception const&) {
|
||||
} catch (std::exception const&) { // NOLINT(bugprone-empty-catch)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -768,7 +768,7 @@ check_metadata(logger& lgr, global_metadata::Meta const& meta, bool check) {
|
||||
}
|
||||
}
|
||||
|
||||
return meta;
|
||||
return meta; // NOLINT(bugprone-return-const-ref-from-parameter)
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
@ -150,7 +150,7 @@ check_metadata_consistency(logger& lgr, global_metadata::Meta const& meta,
|
||||
if (force_consistency_check) {
|
||||
global_metadata::check_consistency(lgr, meta);
|
||||
}
|
||||
return meta;
|
||||
return meta; // NOLINT(bugprone-return-const-ref-from-parameter)
|
||||
}
|
||||
|
||||
void analyze_frozen(std::ostream& os,
|
||||
|
@ -265,7 +265,7 @@ void file::scan(mmif* mm, progress& prog,
|
||||
while (s >= chunk_size) {
|
||||
cs.update(mm->as<void>(offset), chunk_size);
|
||||
// release_until() is best-effort, we can ignore the return value
|
||||
// NOLINTNEXTLINE(bugprone-unused-return-value)
|
||||
// NOLINTNEXTLINE(bugprone-unused-return-value,cert-err33-c)
|
||||
mm->release_until(offset);
|
||||
offset += chunk_size;
|
||||
s -= chunk_size;
|
||||
|
@ -386,7 +386,7 @@ class inode_ : public inode {
|
||||
while (size >= chunk_size) {
|
||||
scanner(mm->span(offset, chunk_size));
|
||||
// release_until() is best-effort, we can ignore the return value
|
||||
// NOLINTNEXTLINE(bugprone-unused-return-value)
|
||||
// NOLINTNEXTLINE(bugprone-unused-return-value,cert-err33-c)
|
||||
mm->release_until(offset);
|
||||
offset += chunk_size;
|
||||
size -= chunk_size;
|
||||
|
@ -319,8 +319,10 @@ void checked_reply_err(LogProxy& log_, fuse_req_t req, T&& f) {
|
||||
#endif
|
||||
|
||||
#if DWARFS_FUSE_LOWLEVEL
|
||||
// NOLINTBEGIN(bugprone-macro-parentheses)
|
||||
#define dUSERDATA \
|
||||
auto& userdata = *reinterpret_cast<dwarfs_userdata*>(fuse_req_userdata(req))
|
||||
// NOLINTEND(bugprone-macro-parentheses)
|
||||
#else
|
||||
#define dUSERDATA \
|
||||
auto& userdata = \
|
||||
|
Loading…
x
Reference in New Issue
Block a user