Skip to content

Commit

Permalink
noreturn compiler directive for *_raise functions
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasjura committed Apr 20, 2019
1 parent e56aca1 commit 5caa3a0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ext/oci8/error.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,12 @@ void Init_oci8_error(void)
rb_define_alias(eOCIError, "parseErrorOffset", "parse_error_offset");
}

void oci8_do_raise(OCIError *errhp, sword status, OCIStmt *stmthp, const char *file, int line)
NORETURN(void oci8_do_raise(OCIError *errhp, sword status, OCIStmt *stmthp, const char *file, int line))
{
rb_exc_raise(oci8_make_exc(errhp, status, OCI_HTYPE_ERROR, stmthp, file, line));
}

void oci8_do_env_raise(OCIEnv *envhp, sword status, int free_envhp, const char *file, int line)
NORETURN(void oci8_do_env_raise(OCIEnv *envhp, sword status, int free_envhp, const char *file, int line))
{
VALUE exc = oci8_make_exc(envhp, status, OCI_HTYPE_ENV, NULL, file, line);
if (free_envhp) {
Expand All @@ -223,7 +223,7 @@ void oci8_do_env_raise(OCIEnv *envhp, sword status, int free_envhp, const char *
rb_exc_raise(exc);
}

void oci8_do_raise_init_error(const char *file, int line)
NORETURN(void oci8_do_raise_init_error(const char *file, int line))
{
VALUE msg = rb_usascii_str_new_cstr("OCI Library Initialization Error");
VALUE exc;
Expand Down

0 comments on commit 5caa3a0

Please sign in to comment.