Warnings compiling AngelScript 2.6.0

Started by
2 comments, last by WitchLord 18 years ago
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...
format c: /q
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.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

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
format c: /q
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

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement