mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 14:27:16 +00:00
(svn r26831) -Fix [Squirrel]: (bogus) warning about falling through in a switch
This commit is contained in:
parent
659d514795
commit
ff880a420d
@ -68,7 +68,7 @@ public:
|
||||
SQCompiler *c = (SQCompiler *)ud;
|
||||
c->Error(s);
|
||||
}
|
||||
void Error(const SQChar *s, ...)
|
||||
NORETURN void Error(const SQChar *s, ...)
|
||||
{
|
||||
static SQChar temp[256];
|
||||
va_list vl;
|
||||
|
2
src/3rdparty/squirrel/squirrel/sqcompiler.h
vendored
2
src/3rdparty/squirrel/squirrel/sqcompiler.h
vendored
@ -72,6 +72,6 @@ struct SQVM;
|
||||
#define TK_CONST 324
|
||||
|
||||
|
||||
typedef void(*CompilerErrorFunc)(void *ud, const SQChar *s);
|
||||
typedef NORETURN void(*CompilerErrorFunc)(void *ud, const SQChar *s);
|
||||
bool Compile(SQVM *vm, SQLEXREADFUNC rg, SQUserPointer up, const SQChar *sourcename, SQObjectPtr &out, bool raiseerror, bool lineinfo);
|
||||
#endif //_SQCOMPILER_H_
|
||||
|
2
src/3rdparty/squirrel/squirrel/sqlexer.cpp
vendored
2
src/3rdparty/squirrel/squirrel/sqlexer.cpp
vendored
@ -89,7 +89,7 @@ void SQLexer::Init(SQSharedState *ss, SQLEXREADFUNC rg, SQUserPointer up,Compile
|
||||
Next();
|
||||
}
|
||||
|
||||
void SQLexer::Error(const SQChar *err)
|
||||
NORETURN void SQLexer::Error(const SQChar *err)
|
||||
{
|
||||
_errfunc(_errtarget,err);
|
||||
}
|
||||
|
2
src/3rdparty/squirrel/squirrel/sqlexer.h
vendored
2
src/3rdparty/squirrel/squirrel/sqlexer.h
vendored
@ -7,7 +7,7 @@ struct SQLexer
|
||||
SQLexer();
|
||||
~SQLexer();
|
||||
void Init(SQSharedState *ss,SQLEXREADFUNC rg,SQUserPointer up,CompilerErrorFunc efunc,void *ed);
|
||||
void Error(const SQChar *err);
|
||||
NORETURN void Error(const SQChar *err);
|
||||
SQInteger Lex();
|
||||
const SQChar *Tok2Str(SQInteger tok);
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user