Commit 3faeffc5 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

jscript: Use DEFAULT_UNREACHABLE macro where appropriate.

parent 9eed654e
...@@ -92,8 +92,7 @@ static void dump_instr_arg(instr_arg_type_t type, instr_arg_t *arg) ...@@ -92,8 +92,7 @@ static void dump_instr_arg(instr_arg_type_t type, instr_arg_t *arg)
case ARG_FUNC: case ARG_FUNC:
case ARG_NONE: case ARG_NONE:
break; break;
default: DEFAULT_UNREACHABLE;
assert(0);
} }
} }
...@@ -447,8 +446,7 @@ static HRESULT compile_memberid_expression(compiler_ctx_t *ctx, expression_t *ex ...@@ -447,8 +446,7 @@ static HRESULT compile_memberid_expression(compiler_ctx_t *ctx, expression_t *ex
hres = push_instr_uint(ctx, OP_memberid, flags); hres = push_instr_uint(ctx, OP_memberid, flags);
break; break;
} }
default: DEFAULT_UNREACHABLE;
assert(0);
} }
return hres; return hres;
...@@ -771,9 +769,7 @@ static HRESULT compile_literal(compiler_ctx_t *ctx, literal_t *literal) ...@@ -771,9 +769,7 @@ static HRESULT compile_literal(compiler_ctx_t *ctx, literal_t *literal)
instr_ptr(ctx, instr)->u.arg[1].uint = literal->u.regexp.flags; instr_ptr(ctx, instr)->u.arg[1].uint = literal->u.regexp.flags;
return S_OK; return S_OK;
} }
default: DEFAULT_UNREACHABLE;
assert(0);
return E_FAIL;
} }
} }
...@@ -797,9 +793,7 @@ static HRESULT literal_as_bstr(compiler_ctx_t *ctx, literal_t *literal, BSTR *st ...@@ -797,9 +793,7 @@ static HRESULT literal_as_bstr(compiler_ctx_t *ctx, literal_t *literal, BSTR *st
jsstr_release(jsstr); jsstr_release(jsstr);
break; break;
} }
default: DEFAULT_UNREACHABLE;
assert(0);
return E_FAIL;
} }
return *str ? S_OK : E_OUTOFMEMORY; return *str ? S_OK : E_OUTOFMEMORY;
...@@ -1050,9 +1044,7 @@ static HRESULT compile_expression(compiler_ctx_t *ctx, expression_t *expr, BOOL ...@@ -1050,9 +1044,7 @@ static HRESULT compile_expression(compiler_ctx_t *ctx, expression_t *expr, BOOL
case EXPR_BXOR: case EXPR_BXOR:
hres = compile_binary_expression(ctx, (binary_expression_t*)expr, OP_xor); hres = compile_binary_expression(ctx, (binary_expression_t*)expr, OP_xor);
break; break;
default: DEFAULT_UNREACHABLE;
assert(0);
hres = E_FAIL;
} }
if(FAILED(hres)) if(FAILED(hres))
...@@ -1769,9 +1761,7 @@ static HRESULT compile_statement(compiler_ctx_t *ctx, statement_ctx_t *stat_ctx, ...@@ -1769,9 +1761,7 @@ static HRESULT compile_statement(compiler_ctx_t *ctx, statement_ctx_t *stat_ctx,
case STAT_WITH: case STAT_WITH:
hres = compile_with_statement(ctx, (with_statement_t*)stat); hres = compile_with_statement(ctx, (with_statement_t*)stat);
break; break;
default: DEFAULT_UNREACHABLE;
assert(0);
hres = E_FAIL;
} }
if(stat_ctx) { if(stat_ctx) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment