FIX: no warnings on unused arguments on non-gnu compilers

This commit is contained in:
Dwachs 2016-06-08 21:08:38 +02:00
parent 4f20c881ab
commit 2e346b54ac
4 changed files with 3 additions and 4 deletions

View File

@ -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

View File

@ -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,...)

View File

@ -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];

View File

@ -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);