From e5e11e3c839f62acd6bd940b657f31c8bba5db39 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Fri, 3 Dec 2021 17:20:39 -0600 Subject: [PATCH] fixup! fix: sonarcloud warnings (#2260) (#2263) the scope of the buf variable was narrowed too far --- libtransmission/resume.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libtransmission/resume.cc b/libtransmission/resume.cc index 366274946..c7072af44 100644 --- a/libtransmission/resume.cc +++ b/libtransmission/resume.cc @@ -729,7 +729,8 @@ static uint64_t loadFromFile(tr_torrent* tor, uint64_t fieldsToLoad, bool* didRe std::string const filename = getResumeFilename(tor, TR_METAINFO_BASENAME_HASH); - if (auto buf = std::vector{}; !tr_loadFile(buf, filename.c_str(), &error) || + auto buf = std::vector{}; + if (!tr_loadFile(buf, filename.c_str(), &error) || !tr_variantFromBuf( &top, TR_VARIANT_PARSE_BENC | TR_VARIANT_PARSE_INPLACE,