1
0
Fork 0

-Wunreachable-code reverted. Visual Studio doesn't like it

This commit is contained in:
Jan Steemann 2014-03-06 11:36:58 +01:00
parent c5c294aa6b
commit 79defc2ef1
13 changed files with 38 additions and 1 deletions

View File

@ -93,6 +93,8 @@ static const char* TypeName (const TRI_aql_access_e type) {
case TRI_AQL_ACCESS_ALL:
return "all";
}
return "unknown";
}
////////////////////////////////////////////////////////////////////////////////
@ -110,6 +112,8 @@ static const char* RangeName (const TRI_aql_range_e type) {
case TRI_AQL_RANGE_UPPER_INCLUDED:
return "upper (inc)";
}
return "unknown";
}
////////////////////////////////////////////////////////////////////////////////

View File

@ -247,6 +247,8 @@ const char* TRI_TypeNameScopeAql (const TRI_aql_scope_e type) {
case TRI_AQL_SCOPE_FUNCTION:
return "function";
}
return "unknown";
}
////////////////////////////////////////////////////////////////////////////////

View File

@ -175,6 +175,7 @@ double MR_float (mrb_state* mrb, mrb_value val) {
case MRB_TT_FLOAT:
return mrb_float(val);
break;
default:
return 0;

View File

@ -958,6 +958,8 @@ int ContinuousSyncer::runContinuousSync (string& errorMsg) {
return TRI_ERROR_REPLICATION_APPLIER_STOPPED;
}
}
return res;
}
////////////////////////////////////////////////////////////////////////////////

View File

@ -852,6 +852,11 @@ static TRI_index_operator_t* SetupConditionsBitarrayHelper (TRI_index_t* idx,
break;
}
default: {
return 0;
}
} // end of switch (operatorType)
return indexOperator;

View File

@ -3243,6 +3243,8 @@ namespace triagens {
offSet = delPos + delLength;
}
return sourceStr;
}

View File

@ -343,6 +343,9 @@ int TRI_CompareValuesJson (const TRI_json_t* const lhs,
return 0;
}
default:
return 0;
}
}
@ -833,6 +836,7 @@ static uint64_t HashJsonRecursive (uint64_t hash, TRI_json_t const* object) {
return hash;
}
}
return hash; // never reached
}
////////////////////////////////////////////////////////////////////////////////

View File

@ -158,6 +158,10 @@ static int IsCodeBlockOpen (struct mrb_parser_state *parser)
case EXPR_MAX_STATE:
/* don't know what to do with this token */
break;
default:
/* this state is unexpected! */
break;
}
return code_block_open;

View File

@ -187,6 +187,8 @@ mrb_value MR_ObjectJson (mrb_state* mrb, TRI_json_t const* json) {
return a;
}
}
return mrb_nil_value();
}
////////////////////////////////////////////////////////////////////////////////

View File

@ -780,6 +780,10 @@ static void VisitProgramOptions (TRI_PO_desc_t * ptr,
case TRI_PO_VECTOR_STRING:
functions->visitVectorStringNode((TRI_PO_vector_string_t *) ptr, input, output);
break;
default:
printf("type unknown");
break;
}
}

View File

@ -98,9 +98,10 @@ namespace triagens {
}
case Handler::HANDLER_FAILED:
default:
return Job::status_t(Job::JOB_FAILED);
}
return Job::status_t(Job::JOB_FAILED);
}
status_e status;

View File

@ -510,6 +510,10 @@ void TRI_PrintShapeAccessor (TRI_shape_access_t* accessor) {
printf(" OP: variable offset at position %lu\n",
(unsigned long) pos);
break;
default:
printf(" OP: unknown op code\n");
return;
}
}
}

View File

@ -1434,6 +1434,8 @@ v8::Handle<v8::Value> TRI_ObjectJson (TRI_json_t const* json) {
case TRI_JSON_LIST:
return scope.Close(ObjectJsonList(json));
}
return scope.Close(v8::Undefined());
}
////////////////////////////////////////////////////////////////////////////////