Removed unused parameter warnings.

closes #488
This commit is contained in:
NathanSweet 2016-04-04 22:16:24 +02:00
parent afecae737a
commit 477240b109
4 changed files with 44 additions and 2 deletions

View File

@ -37,17 +37,22 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/spine-c/include}&quot;"/> <listOptionValue builtIn="false" value="&quot;${workspace_loc:/spine-c/include}&quot;"/>
</option> </option>
<option id="gnu.cpp.compiler.option.other.other.1185307642" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" value="-c -fmessage-length=0" valueType="string"/> <option id="gnu.cpp.compiler.option.other.other.1185307642" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" value="-c -fmessage-length=0" valueType="string"/>
<option id="gnu.cpp.compiler.option.dialect.std.341459864" name="Language standard" superClass="gnu.cpp.compiler.option.dialect.std" value="gnu.cpp.compiler.dialect.default" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.warnings.extrawarn.764877222" name="Extra warnings (-Wextra)" superClass="gnu.cpp.compiler.option.warnings.extrawarn" value="false" valueType="boolean"/>
<option id="gnu.cpp.compiler.option.warnings.pedantic.1836643567" name="Pedantic (-pedantic)" superClass="gnu.cpp.compiler.option.warnings.pedantic" value="false" valueType="boolean"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.564303729" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/> <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.564303729" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool> </tool>
<tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.613741168" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug"> <tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.613741168" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug">
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.mingw.exe.debug.option.optimization.level.71579608" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.debug.option.optimization.level" valueType="enumerated"/> <option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.mingw.exe.debug.option.optimization.level.71579608" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.debug.option.optimization.level" value="gnu.c.optimization.level.none" valueType="enumerated"/>
<option id="gnu.c.compiler.mingw.exe.debug.option.debugging.level.2068803714" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/> <option id="gnu.c.compiler.mingw.exe.debug.option.debugging.level.2068803714" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.2051361089" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"> <option id="gnu.c.compiler.option.include.paths.2051361089" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/spine-c/src}&quot;"/> <listOptionValue builtIn="false" value="&quot;${workspace_loc:/spine-c/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/spine-c/include}&quot;"/> <listOptionValue builtIn="false" value="&quot;${workspace_loc:/spine-c/include}&quot;"/>
</option> </option>
<option id="gnu.c.compiler.option.misc.other.1829716988" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 -std=c89 -pedantic" valueType="string"/> <option id="gnu.c.compiler.option.misc.other.1829716988" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 -std=c89" valueType="string"/>
<option id="gnu.c.compiler.option.dialect.std.849400720" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" value="gnu.c.compiler.dialect.default" valueType="enumerated"/> <option id="gnu.c.compiler.option.dialect.std.849400720" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" value="gnu.c.compiler.dialect.default" valueType="enumerated"/>
<option id="gnu.c.compiler.option.warnings.extrawarn.343205818" name="Extra warnings (-Wextra)" superClass="gnu.c.compiler.option.warnings.extrawarn" value="true" valueType="boolean"/>
<option id="gnu.c.compiler.option.warnings.pedantic.2135414314" name="Pedantic (-pedantic)" superClass="gnu.c.compiler.option.warnings.pedantic" value="true" valueType="boolean"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.603555848" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.603555848" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool> </tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug.1030541714" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug"/> <tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug.1030541714" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug"/>

View File

@ -77,6 +77,8 @@
#define ACOS(A) (float)acos(A) #define ACOS(A) (float)acos(A)
#endif #endif
#define UNUSED(x) (void)(x)
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>

View File

@ -294,6 +294,10 @@ void _spRotateTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton,
while (amount < -180) while (amount < -180)
amount += 360; amount += 360;
bone->rotation += amount * alpha; bone->rotation += amount * alpha;
UNUSED(lastTime);
UNUSED(firedEvents);
UNUSED(eventsCount);
} }
spRotateTimeline* spRotateTimeline_create (int framesCount) { spRotateTimeline* spRotateTimeline_create (int framesCount) {
@ -342,6 +346,10 @@ void _spTranslateTimeline_apply (const spTimeline* timeline, spSkeleton* skeleto
* alpha; * alpha;
bone->y += (bone->data->y + prevFrameY + (self->frames[frameIndex + TRANSLATE_FRAME_Y] - prevFrameY) * percent - bone->y) bone->y += (bone->data->y + prevFrameY + (self->frames[frameIndex + TRANSLATE_FRAME_Y] - prevFrameY) * percent - bone->y)
* alpha; * alpha;
UNUSED(lastTime);
UNUSED(firedEvents);
UNUSED(eventsCount);
} }
spTranslateTimeline* spTranslateTimeline_create (int framesCount) { spTranslateTimeline* spTranslateTimeline_create (int framesCount) {
@ -386,6 +394,10 @@ void _spScaleTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, f
- bone->scaleX) * alpha; - bone->scaleX) * alpha;
bone->scaleY += (bone->data->scaleY * (prevFrameY + (self->frames[frameIndex + TRANSLATE_FRAME_Y] - prevFrameY) * percent) bone->scaleY += (bone->data->scaleY * (prevFrameY + (self->frames[frameIndex + TRANSLATE_FRAME_Y] - prevFrameY) * percent)
- bone->scaleY) * alpha; - bone->scaleY) * alpha;
UNUSED(lastTime);
UNUSED(firedEvents);
UNUSED(eventsCount);
} }
spScaleTimeline* spScaleTimeline_create (int framesCount) { spScaleTimeline* spScaleTimeline_create (int framesCount) {
@ -449,6 +461,10 @@ void _spColorTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, f
slot->b = b; slot->b = b;
slot->a = a; slot->a = a;
} }
UNUSED(lastTime);
UNUSED(firedEvents);
UNUSED(eventsCount);
} }
spColorTimeline* spColorTimeline_create (int framesCount) { spColorTimeline* spColorTimeline_create (int framesCount) {
@ -485,6 +501,10 @@ void _spAttachmentTimeline_apply (const spTimeline* timeline, spSkeleton* skelet
attachmentName = self->attachmentNames[frameIndex]; attachmentName = self->attachmentNames[frameIndex];
spSlot_setAttachment(skeleton->slots[self->slotIndex], spSlot_setAttachment(skeleton->slots[self->slotIndex],
attachmentName ? spSkeleton_getAttachmentForSlotIndex(skeleton, self->slotIndex, attachmentName) : 0); attachmentName ? spSkeleton_getAttachmentForSlotIndex(skeleton, self->slotIndex, attachmentName) : 0);
UNUSED(firedEvents);
UNUSED(eventsCount);
UNUSED(alpha);
} }
void _spAttachmentTimeline_dispose (spTimeline* timeline) { void _spAttachmentTimeline_dispose (spTimeline* timeline) {
@ -608,6 +628,11 @@ void _spDrawOrderTimeline_apply (const spTimeline* timeline, spSkeleton* skeleto
for (i = 0; i < self->slotsCount; ++i) for (i = 0; i < self->slotsCount; ++i)
skeleton->drawOrder[i] = skeleton->slots[drawOrderToSetupIndex[i]]; skeleton->drawOrder[i] = skeleton->slots[drawOrderToSetupIndex[i]];
} }
UNUSED(lastTime);
UNUSED(firedEvents);
UNUSED(eventsCount);
UNUSED(alpha);
} }
void _spDrawOrderTimeline_dispose (spTimeline* timeline) { void _spDrawOrderTimeline_dispose (spTimeline* timeline) {
@ -704,6 +729,10 @@ void _spFFDTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, flo
slot->attachmentVertices[i] = prev + (nextVertices[i] - prev) * percent; slot->attachmentVertices[i] = prev + (nextVertices[i] - prev) * percent;
} }
} }
UNUSED(lastTime);
UNUSED(firedEvents);
UNUSED(eventsCount);
} }
void _spFFDTimeline_dispose (spTimeline* timeline) { void _spFFDTimeline_dispose (spTimeline* timeline) {
@ -776,6 +805,10 @@ void _spIkConstraintTimeline_apply (const spTimeline* timeline, spSkeleton* skel
mix = prevFrameMix + (self->frames[frameIndex + IKCONSTRAINT_FRAME_MIX] - prevFrameMix) * percent; mix = prevFrameMix + (self->frames[frameIndex + IKCONSTRAINT_FRAME_MIX] - prevFrameMix) * percent;
ikConstraint->mix += (mix - ikConstraint->mix) * alpha; ikConstraint->mix += (mix - ikConstraint->mix) * alpha;
ikConstraint->bendDirection = (int)self->frames[frameIndex + IKCONSTRAINT_PREV_FRAME_BEND_DIRECTION]; ikConstraint->bendDirection = (int)self->frames[frameIndex + IKCONSTRAINT_PREV_FRAME_BEND_DIRECTION];
UNUSED(lastTime);
UNUSED(firedEvents);
UNUSED(eventsCount);
} }
spIkConstraintTimeline* spIkConstraintTimeline_create (int framesCount) { spIkConstraintTimeline* spIkConstraintTimeline_create (int framesCount) {

View File

@ -104,6 +104,8 @@ spAttachment* _spAtlasAttachmentLoader_createAttachment (spAttachmentLoader* loa
_spAttachmentLoader_setUnknownTypeError(loader, type); _spAttachmentLoader_setUnknownTypeError(loader, type);
return 0; return 0;
} }
UNUSED(skin);
} }
spAtlasAttachmentLoader* spAtlasAttachmentLoader_create (spAtlas* atlas) { spAtlasAttachmentLoader* spAtlasAttachmentLoader_create (spAtlas* atlas) {