Skip to content

Commit e36c541

Browse files
Keenan GugelerRiolku
authored andcommitted
cmake: enable Wextra
Primarily these warnings fall into two categories: - Unused parameter (that clang-tidy didn't catch). - Mismatch sign comparison. Generally this happens in loops, and the correct fix is `auto i = 0u`. This gives `i` the type of `unsigned`, and so we must be careful that `i` cannot overflow 2^32. Wextra is disabled when building third_party code.
1 parent 8d6aec8 commit e36c541

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src_cpp/include/node_query_result.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class NodeQueryResultGetNextAsyncWorker : public Napi::AsyncWorker {
9898
Napi::Object nodeTuple = Napi::Object::New(env);
9999
try {
100100
auto columnNames = nodeQueryResult->queryResult->getColumnNames();
101-
for (auto i = 0; i < cppTuple->len(); ++i) {
101+
for (auto i = 0u; i < cppTuple->len(); ++i) {
102102
Napi::Value value = Util::ConvertToNapiObject(*cppTuple->getValue(i), env);
103103
nodeTuple.Set(columnNames[i], value);
104104
}

0 commit comments

Comments
 (0)