mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-19 09:17:21 -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;
|
j = JEMALLOC_VERSION;
|
||||||
#else
|
#else
|
||||||
size_t s = sizeof(j);
|
size_t s = sizeof(j);
|
||||||
|
// NOLINTNEXTLINE(bugprone-multi-level-implicit-pointer-conversion)
|
||||||
::mallctl("version", &j, &s, nullptr, 0);
|
::mallctl("version", &j, &s, nullptr, 0);
|
||||||
#endif
|
#endif
|
||||||
std::string rv{j};
|
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)) {
|
if (sec.check_fast(*mm)) {
|
||||||
try {
|
try {
|
||||||
return get_block_decompressor(std::move(mm), sec);
|
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>
|
template <typename T>
|
||||||
|
@ -150,7 +150,7 @@ check_metadata_consistency(logger& lgr, global_metadata::Meta const& meta,
|
|||||||
if (force_consistency_check) {
|
if (force_consistency_check) {
|
||||||
global_metadata::check_consistency(lgr, meta);
|
global_metadata::check_consistency(lgr, meta);
|
||||||
}
|
}
|
||||||
return meta;
|
return meta; // NOLINT(bugprone-return-const-ref-from-parameter)
|
||||||
}
|
}
|
||||||
|
|
||||||
void analyze_frozen(std::ostream& os,
|
void analyze_frozen(std::ostream& os,
|
||||||
|
@ -265,7 +265,7 @@ void file::scan(mmif* mm, progress& prog,
|
|||||||
while (s >= chunk_size) {
|
while (s >= chunk_size) {
|
||||||
cs.update(mm->as<void>(offset), chunk_size);
|
cs.update(mm->as<void>(offset), chunk_size);
|
||||||
// release_until() is best-effort, we can ignore the return value
|
// 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);
|
mm->release_until(offset);
|
||||||
offset += chunk_size;
|
offset += chunk_size;
|
||||||
s -= chunk_size;
|
s -= chunk_size;
|
||||||
|
@ -386,7 +386,7 @@ class inode_ : public inode {
|
|||||||
while (size >= chunk_size) {
|
while (size >= chunk_size) {
|
||||||
scanner(mm->span(offset, chunk_size));
|
scanner(mm->span(offset, chunk_size));
|
||||||
// release_until() is best-effort, we can ignore the return value
|
// 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);
|
mm->release_until(offset);
|
||||||
offset += chunk_size;
|
offset += chunk_size;
|
||||||
size -= chunk_size;
|
size -= chunk_size;
|
||||||
|
@ -319,8 +319,10 @@ void checked_reply_err(LogProxy& log_, fuse_req_t req, T&& f) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if DWARFS_FUSE_LOWLEVEL
|
#if DWARFS_FUSE_LOWLEVEL
|
||||||
|
// NOLINTBEGIN(bugprone-macro-parentheses)
|
||||||
#define dUSERDATA \
|
#define dUSERDATA \
|
||||||
auto& userdata = *reinterpret_cast<dwarfs_userdata*>(fuse_req_userdata(req))
|
auto& userdata = *reinterpret_cast<dwarfs_userdata*>(fuse_req_userdata(req))
|
||||||
|
// NOLINTEND(bugprone-macro-parentheses)
|
||||||
#else
|
#else
|
||||||
#define dUSERDATA \
|
#define dUSERDATA \
|
||||||
auto& userdata = \
|
auto& userdata = \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user