Jump to content
  • Advertisement
Sign in to follow this  
ALRAZ

Warnings compiling AngelScript 2.6.0

This topic is 4475 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

when I compile AngelScript with Dev-Cpp, it gives me the following warnings: G:\sdk\angelscript\source\as_context.cpp In member function `virtual void* asCContext::GetReturnObject()': 478 G:\sdk\angelscript\source\as_context.cpp [Warning] cast to pointer from integer of different size G:\sdk\angelscript\source\as_context.cpp In member function `void asCContext::ExecuteNext()': 1085 G:\sdk\angelscript\source\as_context.cpp [Warning] cast to pointer from integer of different size Im using the following options: -General: -Project type: DLL file -Compiler: -Optimization: Perform a number of minor optimizations = Yes -Further Optimization: Optimize More -Parameters: -C++ Compiler = -DANGELSCRIPT_EXPORT and that's all...

Share this post


Link to post
Share on other sites
Advertisement
Thanks for letting me know.

The register1 variable must be cast to size_t before casting it to the pointer to resolve this warning. I'll add that for the next release.

Share this post


Link to post
Share on other sites
it's good to see you know your code WitchLord :)
and you know what you are doing.

that's the kind of warning I would resolve by try and fail XD

anyways... here is another warning, this time, in scriptstring.cpp
Same thing: compiling with dev-cpp.

G:\sdk\add_on\scriptstring\scriptstring.cpp In function `void StringFree(void*)': 494 G:\sdk\add_on\scriptstring\scriptstring.cpp [Warning] deleting `void*' is undefined

not sure why it says that...
i've deleted lots of voids before... and never got this warning

Share this post


Link to post
Share on other sites
g++ complains about deleting void*, but as far as I can tell it always does the correct thing anyway.

In either case, this warning can also be removed by casting the void* to a asCScriptString* first, since the StringFree function is only registered for the asCScriptString type. I'll make that change as well.

Thanks

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!