Skip to content

Commit 74e46c4

Browse files
authored
Merge pull request #201 from drkannan/Issue-16-wreturn-type
Resolves issue #16: Added return statements
2 parents ee611d8 + 404ab5e commit 74e46c4

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ target_compile_options(fdbdoc
122122
-Werror
123123
-Wno-error=format
124124
-Wno-deprecated
125-
# -Wreturn-type
125+
-Wreturn-type
126126
-fvisibility=hidden
127127
-fno-omit-frame-pointer
128128
)

src/ConsoleMetric.actor.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ MetricStat& MetricStat::captureNewValue(int64_t val) {
141141
sum += val;
142142
avg = (double)sum / (double)count;
143143
return *this;
144+
default:
145+
// Issue #16: Added default return statement to fix the warning during compilation
146+
return *this;
144147
}
145148
}
146149
}

src/QLPlan.actor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,9 @@ Optional<Reference<Plan>> IndexScanPlan::push_down(Reference<UnboundCollectionCo
247247
default:
248248
return Optional<Reference<Plan>>();
249249
}
250-
} else {
251-
return Optional<Reference<Plan>>();
252250
}
251+
// Issue #16: Added return statement in right place to fix the warning during compilation
252+
return Optional<Reference<Plan>>();
253253
}
254254

255255
ACTOR static Future<Void> doFilter(PlanCheckpoint* checkpoint,

0 commit comments

Comments
 (0)