Sign in to follow this  
ALRAZ

Warnings compiling AngelScript 2.6.0

Recommended Posts

ALRAZ    150
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
WitchLord    4677
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
ALRAZ    150
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
WitchLord    4677
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this