FIX: no warnings on unused arguments on non-gnu compilers
This commit is contained in:
parent
4f20c881ab
commit
2e346b54ac
@ -396,7 +396,7 @@ SQUIRREL_API void sq_setnativedebughook(HSQUIRRELVM v,SQDEBUGHOOK hook);
|
||||
#ifdef __GNUC__
|
||||
# define SQ_UNUSED_ARG(x) __attribute__((unused)) x
|
||||
#else
|
||||
# define SQ_UNUSED_ARG(x) x
|
||||
# define SQ_UNUSED_ARG(x)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
1
sq/sq.c
1
sq/sq.c
@ -52,7 +52,6 @@ void printfunc(HSQUIRRELVM SQ_UNUSED_ARG(v),const SQChar *s,...)
|
||||
va_start(vl, s);
|
||||
scvprintf(stdout, s, vl);
|
||||
va_end(vl);
|
||||
(void)v; /* UNUSED */
|
||||
}
|
||||
|
||||
void errorfunc(HSQUIRRELVM SQ_UNUSED_ARG(v),const SQChar *s,...)
|
||||
|
@ -189,7 +189,7 @@ SQInstance::~SQInstance()
|
||||
if(_class){ Finalize(); } //if _class is null it was already finalized by the GC
|
||||
}
|
||||
|
||||
bool SQInstance::GetMetaMethod(SQVM SQ_UNUSED_ARG(*v),SQMetaMethod mm,SQObjectPtr &res)
|
||||
bool SQInstance::GetMetaMethod(SQVM* SQ_UNUSED_ARG(v),SQMetaMethod mm,SQObjectPtr &res)
|
||||
{
|
||||
if(type(_class->_metamethods[mm]) != OT_NULL) {
|
||||
res = _class->_metamethods[mm];
|
||||
|
@ -241,7 +241,7 @@ void SQSharedState::MarkObject(SQObjectPtr &o,SQCollectable **chain)
|
||||
}
|
||||
}
|
||||
|
||||
void SQSharedState::RunMark(SQVM SQ_UNUSED_ARG(*vm),SQCollectable **tchain)
|
||||
void SQSharedState::RunMark(SQVM* SQ_UNUSED_ARG(vm),SQCollectable **tchain)
|
||||
{
|
||||
SQVM *vms = _thread(_root_vm);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user