Unreachable code to silence older compilers

This commit is contained in:
Asanka C. Herath
2010-11-18 20:46:23 -05:00
parent 880d728e02
commit 59542f4298
2 changed files with 11 additions and 1 deletions

View File

@@ -58,8 +58,10 @@ integer_symbol(const char *basename, const Type *t)
return "unsigned";
else if (t->range->min == 0 && t->range->max == INT_MAX)
return "unsigned";
else
else {
abort();
UNREACHABLE(return NULL);
}
}
static const char *

View File

@@ -182,6 +182,7 @@ krb5_verr(krb5_context context, int eval, krb5_error_code code,
{
_warnerr(context, 1, code, 0, fmt, ap);
exit(eval);
UNREACHABLE(return 0);
}
/**
@@ -203,6 +204,7 @@ krb5_err(krb5_context context, int eval, krb5_error_code code,
{
FUNC(1, code, 0);
exit(eval);
UNREACHABLE(return 0);
}
/**
@@ -222,6 +224,7 @@ krb5_verrx(krb5_context context, int eval, const char *fmt, va_list ap)
{
_warnerr(context, 0, 0, 0, fmt, ap);
exit(eval);
UNREACHABLE(return 0);
}
/**
@@ -240,6 +243,7 @@ krb5_errx(krb5_context context, int eval, const char *fmt, ...)
{
FUNC(0, 0, 0);
exit(eval);
UNREACHABLE(return 0);
}
/**
@@ -261,6 +265,7 @@ krb5_vabort(krb5_context context, krb5_error_code code,
{
_warnerr(context, 1, code, 0, fmt, ap);
abort();
UNREACHABLE(return 0);
}
/**
@@ -280,6 +285,7 @@ krb5_abort(krb5_context context, krb5_error_code code, const char *fmt, ...)
{
FUNC(1, code, 0);
abort();
UNREACHABLE(return 0);
}
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
@@ -288,6 +294,7 @@ krb5_vabortx(krb5_context context, const char *fmt, va_list ap)
{
_warnerr(context, 0, 0, 0, fmt, ap);
abort();
UNREACHABLE(return 0);
}
/**
@@ -306,6 +313,7 @@ krb5_abortx(krb5_context context, const char *fmt, ...)
{
FUNC(0, 0, 0);
abort();
UNREACHABLE(return 0);
}
/**