OpenArena / engine

OpenArena modifications to the ioquake3 engine
http://openarena.ws
GNU General Public License v2.0
212 stars 50 forks source link

warning: comparison between pointer and integer #40

Closed suijingfeng closed 6 years ago

suijingfeng commented 6 years ago

https://github.com/OpenArena/engine/blob/master/code/renderer_oa/tr_model.c code/renderer_oa/tr_model.c:202:11: warning: comparison with string literal results in unspecified behavior

if(ident == MDO_IDENT) ^ ident is a int, while MDO_IDENT is defined as a string in tr_mdo.h

define MDO_IDENT "OPENMDL2"

leilei- commented 6 years ago

MDO's meant to be removed. I didn't remove it out enough

The-Gig commented 6 years ago

It's sad that the author of MDO format disappeared from the forums without finishing it... :-( http://openarena.ws/board/index.php?topic=5169.25 Wondering if someone may be able to look at what was done back then (there is something attached to this post) and continue the work from there...

leilei- commented 6 years ago

Don't mislead into wasting effort on a format I don't plan to use....

sago007 commented 6 years ago

Should tr_model_mdo.c be removed? There are quite a lot warnings in tr_model_mdo.c, so if it is not needed then I would remove it as soon as possible.

REF_CC code/renderer_oa/tr_model_mdo.c
code/renderer_oa/tr_model_mdo.c: In function ‘R_LoadMDO’:
code/renderer_oa/tr_model_mdo.c:106:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
code/renderer_oa/tr_model_mdo.c:43:16: warning: unused variable ‘k’ [-Wunused-variable]
code/renderer_oa/tr_model_mdo.c: In function ‘R_AddMDOSurfaces’:
code/renderer_oa/tr_model_mdo.c:360:15: warning: unused variable ‘k’ [-Wunused-variable]
code/renderer_oa/tr_model_mdo.c: In function ‘R_GetMDOTag’:
code/renderer_oa/tr_model_mdo.c:585:11: warning: unused variable ‘trans’ [-Wunused-variable]
code/renderer_oa/tr_model_mdo.c:584:11: warning: unused variable ‘quat’ [-Wunused-variable]
code/renderer_oa/tr_model_mdo.c: In function ‘RB_SurfaceMDO’:
code/renderer_oa/tr_model_mdo.c:633:17: warning: variable ‘boneInfo’ set but not used [-Wunused-but-set-variable]
code/renderer_oa/tr_model_mdo.c:621:10: warning: variable ‘frontlerp’ set but not used [-Wunused-but-set-variable]
sago007 commented 6 years ago

"As soon as possible" turned out to take a little longer than one would think. But MDO has been removed in 1e47ea52641ea79d1febae47f9d4fde6e6f5f5cb