You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kvrocks.apache.org by ti...@apache.org on 2022/06/23 02:45:57 UTC

[incubator-kvrocks] branch unstable updated: add __builtin_unreachable to raiseError to make compiler happy (#651)

This is an automated email from the ASF dual-hosted git repository.

tison pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/incubator-kvrocks.git


The following commit(s) were added to refs/heads/unstable by this push:
     new c729935  add __builtin_unreachable to raiseError to make compiler happy (#651)
c729935 is described below

commit c7299353d64ae988a44634791b229827c7e4e19b
Author: Twice <tw...@gmail.com>
AuthorDate: Thu Jun 23 10:45:52 2022 +0800

    add __builtin_unreachable to raiseError to make compiler happy (#651)
---
 src/scripting.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/scripting.cc b/src/scripting.cc
index c84c814..675e829 100644
--- a/src/scripting.cc
+++ b/src/scripting.cc
@@ -779,7 +779,8 @@ std::string replyToRedisReply(lua_State *lua) {
 [[noreturn]] int raiseError(lua_State *lua) {
   lua_pushstring(lua, "err");
   lua_gettable(lua, -2);
-  return lua_error(lua);
+  lua_error(lua);
+  __builtin_unreachable();
 }
 
 /* Sort the array currently in the stack. We do this to make the output