mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-15 21:59:41 -04:00
BUILD: lua: silence some compiler warnings after WILL_LJMP
These ones are on error paths that are properly handled by luaL_error() which does a longjmp() but the compiler cannot know it. By adding an __unreachable() statement in WILL_LJMP(), there is no ambiguity anymore. This may be backported to 1.8 but these previous patches are needed first : - BUILD: compiler: add a new statement "__unreachable()" - MINOR: lua: all functions calling lua_yieldk() may return - BUILD: lua: silence some compiler warnings about potential null derefs (#2)
This commit is contained in:
parent
9635e03c41
commit
b059b894cd
1 changed files with 2 additions and 1 deletions
|
|
@ -25,6 +25,7 @@
|
|||
#include <ebpttree.h>
|
||||
|
||||
#include <common/cfgparse.h>
|
||||
#include <common/compiler.h>
|
||||
#include <common/xref.h>
|
||||
#include <common/hathreads.h>
|
||||
|
||||
|
|
@ -67,7 +68,7 @@
|
|||
* MAY_LJMP() marks an lua function that may use longjmp.
|
||||
*/
|
||||
#define __LJMP
|
||||
#define WILL_LJMP(func) func
|
||||
#define WILL_LJMP(func) do { func; __unreachable(); } while(0)
|
||||
#define MAY_LJMP(func) func
|
||||
|
||||
/* This couple of function executes securely some Lua calls outside of
|
||||
|
|
|
|||
Loading…
Reference in a new issue