Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#6070 closed defect (fixed)

TOON: AmigaOS4 Compiler error in anim.cpp

Reported by: raziel- Owned by: digitall
Priority: normal Component: Engine: Toon
Version: Keywords: build
Cc: Game: Toonstruck

Description

Latest Sources

C++ engines/toon/anim.o engines/toon/anim.cpp: In member function 'void Toon::Animation::drawFrame(Graphics::Surface&, int32, int16, int16)': engines/toon/anim.cpp:136: warning: format '%d' expects type 'int', but argument 4 has type 'int32' engines/toon/anim.cpp: In member function 'void Toon::Animation::drawFrameWithMask(Graphics::Surface&, int32, int16, int16, int32, Toon::Picture*)': engines/toon/anim.cpp:206: warning: format '%d' expects type 'int', but argument 4 has type 'int32' engines/toon/anim.cpp:206: warning: format '%d' expects type 'int', but argument 7 has type 'int32' engines/toon/anim.cpp: In member function 'void Toon::Animation::drawFrameWithMaskAndScale(Graphics::Surface&, int32, int16, int16, int32, Toon::Picture*, int32)': engines/toon/anim.cpp:211: warning: format '%d' expects type 'int', but argument 4 has type 'int32' engines/toon/anim.cpp:211: warning: format '%d' expects type 'int', but argument 7 has type 'int32' engines/toon/anim.cpp:211: warning: format '%d' expects type 'int', but argument 8 has type 'int32' engines/toon/anim.cpp: In member function 'void Toon::Animation::applyPalette(int32, int32, int32)': engines/toon/anim.cpp:262: warning: format '%d' expects type 'int', but argument 4 has type 'int32' engines/toon/anim.cpp:262: warning: format '%d' expects type 'int', but argument 5 has type 'int32' engines/toon/anim.cpp:262: warning: format '%d' expects type 'int', but argument 6 has type 'int32' engines/toon/anim.cpp: In member function 'Common::Rect Toon::Animation::getFrameRect(int32)': engines/toon/anim.cpp:267: warning: format '%d' expects type 'int', but argument 4 has type 'int32' engines/toon/anim.cpp: In member function 'int16 Toon::Animation::getFrameWidth(int32)': engines/toon/anim.cpp:279: warning: format '%d' expects type 'int', but argument 4 has type 'int32' engines/toon/anim.cpp: In member function 'int16 Toon::Animation::getFrameHeight(int32)': engines/toon/anim.cpp:290: warning: format '%d' expects type 'int', but argument 4 has type 'int32' engines/toon/anim.cpp: In member function 'void Toon::Animation::drawFontFrame(Graphics::Surface&, int32, int16, int16, byte*)': engines/toon/anim.cpp:309: warning: format '%d' expects type 'int', but argument 4 has type 'int32' engines/toon/anim.cpp: In member function 'void Toon::Animation::drawFrameOnPicture(int32, int16, i nt16)': engines/toon/anim.cpp:356: warning: format '%d' expects type 'int', but argument 4 has type 'int32' engines/toon/anim.cpp: In member function 'void Toon::AnimationInstance::update(int32)': engines/toon/anim.cpp:405: warning: format '%d' expects type 'int', but argument 4 has type 'int32' engines/toon/anim.cpp: At global scope: engines/toon/anim.cpp:504: error: prototype for 'void Toon::AnimationInstance::setAnimationRange(in t32, int)' does not match any in class 'Toon::AnimationInstance' ./engines/toon/anim.h:95: error: candidate is: void Toon::AnimationInstance::setAnimationRange(int 32, int32) engines/toon/anim.cpp: In member function 'void Toon::AnimationInstance::setAnimationRange(int32, int)': engines/toon/anim.cpp:505: warning: format '%d' expects type 'int', but argument 4 has type 'int32 ' engines/toon/anim.cpp: In member function 'void Toon::AnimationInstance::setPosition(int16, int16, int32, bool)': engines/toon/anim.cpp:517: warning: format '%d' expects type 'int', but argument 6 has type 'int32' engines/toon/anim.cpp: In member function 'void Toon::AnimationInstance::moveRelative(int16, int16, int32)': engines/toon/anim.cpp:530: warning: format '%d' expects type 'int', but argument 6 has type 'int32' engines/toon/anim.cpp: In member function 'void Toon::AnimationInstance::forceFrame(int32)': engines/toon/anim.cpp:537: warning: format '%d' expects type 'int', but argument 4 has type 'int32' engines/toon/anim.cpp: In member function 'void Toon::AnimationInstance::setFrame(int32)': engines/toon/anim.cpp:544: warning: format '%d' expects type 'int', but argument 4 has type 'int32' engines/toon/anim.cpp: In member function 'void Toon::AnimationInstance::setFps(int32)': engines/toon/anim.cpp:549: warning: format '%d' expects type 'int', but argument 4 has type 'int32' engines/toon/anim.cpp: In member function 'void Toon::AnimationInstance::setScale(int32, bool)': engines/toon/anim.cpp:564: warning: format '%d' expects type 'int', but argument 4 has type 'int32' engines/toon/anim.cpp: In member function 'void Toon::AnimationInstance::setZ(int32, bool)': engines/toon/anim.cpp:606: warning: format '%d' expects type 'int', but argument 4 has type 'int32' engines/toon/anim.cpp: In member function 'void Toon::AnimationManager::update(int32)': engines/toon/anim.cpp:747: warning: format '%d' expects type 'int', but argument 4 has type 'int32' gmake: *** [engines/toon/anim.o] Error 1

AmigaOS4 - PPC - SDL - BE gcc (GCC) 4.2.4 (adtools build 20090118)

Ticket imported from: #3539018. Ticket imported from: bugs/6070.

Change History (9)

comment:1 by digitall, 12 years ago

raziel_: Fixed error due to mismatch in anim class method definition versus prototype in commit 100ff974cb38304890afa96f43259b55464bd888.

Please recompile and test that compilation is now successful.

Have left the warnings for now. Once, we have covered the errors, I will ask you to attach a full log and will attempt to work out a fix for those if possible.

comment:2 by digitall, 12 years ago

Owner: set to digitall
Resolution: fixed

comment:3 by digitall, 12 years ago

Changing to pending as awaiting user update.

comment:4 by digitall, 12 years ago

Status: newpending

comment:5 by raziel-, 12 years ago

Sorry, i never replied to fixed compiler errors before unless the fix did not work :-)

Fixed with your commit, thanks a lot

comment:6 by raziel-, 12 years ago

Status: pendingnew

comment:7 by digitall, 12 years ago

Thanks for confirming the fix. The warnings here are due to the debug format strings which are passed down internally to printf. AFAIK, the printf "%d" format specifier is intended to take int, but this covers int32 on most machines... To remove this may require changing to "%ld", but I'm not sure if this is standardised.. Will ask a member of the core team to look at this, but will close bug as fixed anyway.

comment:8 by digitall, 12 years ago

Status: newclosed

comment:9 by lordhoto, 12 years ago

Summary: Toon: AmigaOS4 Compiler error in anim.cppTOON: AmigaOS4 Compiler error in anim.cpp
Note: See TracTickets for help on using tickets.