Skip to content

Commit

Permalink
Silence a compiler warning
Browse files Browse the repository at this point in the history
The compiler doesn't know that `rb_raise` longjmps us out of the
function, so make it feel better by pretending that we'll return a VALUE
no matter what.

Fixes the Clang warning:

  watchman.c:470:1: warning: control may reach end of non-void function [-Wreturn-type]

Signed-off-by: Wincent Colaiuta <win@wincent.com>
  • Loading branch information
wincent committed Mar 28, 2014
1 parent 96d26bf commit c73d58e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ruby/command-t/watchman.c
Expand Up @@ -467,6 +467,8 @@ VALUE watchman_load(char **ptr, char *end) {
default:
rb_raise(rb_eTypeError, "unsupported type");
}

return Qnil; // keep the compiler happy
}

/**
Expand Down

0 comments on commit c73d58e

Please sign in to comment.