From 1fa6a3e3354bd98707303476b5a54147ccdd533a Mon Sep 17 00:00:00 2001 From: Jade Lovelace Date: Fri, 29 Mar 2024 20:26:38 -0700 Subject: Fix various clang-tidy lints * some things that can throw are marked noexcept yet the linter seems to think not. Maybe they can't throw in practice. I would rather not have the UB possibility in pretty obvious cold paths. * various default-case-missing complaints * a fair pile of casts from integer to character, which are in fact deliberate. * an instance of * bugprone-not-null-terminated-result on handing a string to curl in chunks of bytes. our usage is fine. * reassigning a unique_ptr by CRIMES instead of using release(), then using release() and ignoring the result. wild. let's use release() for its intended purpose. Change-Id: Ic3e7affef12383576213a8a7c8145c27e662513d --- src/libstore/content-address.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstore/content-address.hh') diff --git a/src/libstore/content-address.hh b/src/libstore/content-address.hh index c4d619bdc..200543704 100644 --- a/src/libstore/content-address.hh +++ b/src/libstore/content-address.hh @@ -255,7 +255,7 @@ struct ContentAddressWithReferences * Create a `ContentAddressWithReferences` from a mere * `ContentAddress`, by claiming no references. */ - static ContentAddressWithReferences withoutRefs(const ContentAddress &) noexcept; + static ContentAddressWithReferences withoutRefs(const ContentAddress &); /** * Create a `ContentAddressWithReferences` from 3 parts: @@ -270,7 +270,7 @@ struct ContentAddressWithReferences * returns for invalid combinations. */ static std::optional fromPartsOpt( - ContentAddressMethod method, Hash hash, StoreReferences refs) noexcept; + ContentAddressMethod method, Hash hash, StoreReferences refs); ContentAddressMethod getMethod() const; -- cgit v1.2.3