summaryrefslogtreecommitdiffstats
path: root/searchlib/src/apps
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-01-26 17:42:37 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2022-01-26 17:42:37 +0000
commit70583db573e8e0033694e8c3d403d256f9e8cfed (patch)
tree3054a18c93ad506937acea4d3831241a8b819e5b /searchlib/src/apps
parent206b56d5d561f0da77268dbee9e78c2d58ce923a (diff)
Add [[nodiscard]] to Write2 and CheckedWrite too
Diffstat (limited to 'searchlib/src/apps')
-rw-r--r--searchlib/src/apps/docstore/create-idx-from-dat.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/searchlib/src/apps/docstore/create-idx-from-dat.cpp b/searchlib/src/apps/docstore/create-idx-from-dat.cpp
index 477282fdbf4..30af02ddb92 100644
--- a/searchlib/src/apps/docstore/create-idx-from-dat.cpp
+++ b/searchlib/src/apps/docstore/create-idx-from-dat.cpp
@@ -79,7 +79,8 @@ generate(uint64_t serialNum, size_t chunks, FastOS_FileInterface & idxFile, size
fprintf(stdout, "Failed with lengthError %ld due to '%s'\n", lengthError, e.what());
}
}
- idxFile.Write2(os.data(), os.size());
+ ssize_t written = idxFile.Write2(os.data(), os.size());
+ assert(written == ssize_t(os.size()));
return serialNum;
}