diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c9d1b34..6c2d28a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -122,7 +122,7 @@ target_compile_options(fdbdoc -Werror -Wno-error=format -Wno-deprecated - # -Wreturn-type + -Wreturn-type -fvisibility=hidden -fno-omit-frame-pointer ) diff --git a/src/ConsoleMetric.actor.cpp b/src/ConsoleMetric.actor.cpp index a802705..0e39e43 100644 --- a/src/ConsoleMetric.actor.cpp +++ b/src/ConsoleMetric.actor.cpp @@ -141,6 +141,9 @@ MetricStat& MetricStat::captureNewValue(int64_t val) { sum += val; avg = (double)sum / (double)count; return *this; + default: + // Issue #16: Added default return statement to fix the warning during compilation + return *this; } } } diff --git a/src/QLPlan.actor.cpp b/src/QLPlan.actor.cpp index 43e530d..51e6218 100644 --- a/src/QLPlan.actor.cpp +++ b/src/QLPlan.actor.cpp @@ -247,9 +247,9 @@ Optional> IndexScanPlan::push_down(Reference>(); } - } else { - return Optional>(); } + // Issue #16: Added return statement in right place to fix the warning during compilation + return Optional>(); } ACTOR static Future doFilter(PlanCheckpoint* checkpoint,