View Issue Details

IDProjectCategoryView StatusLast Update
0004449Spring engineLuapublic2014-06-26 22:43
Reportersilentwings Assigned ToKloot  
PrioritynormalSeverityminorReproducibilityN/A
Status resolvedResolutionfixed 
Product Version97.0.1+git 
Summary0004449: mingw compile error: cast from 'const void*' to 'long unsigned int' loses precision
Description||=== Build: engine-legacy in Spring (compiler: GNU GCC Compiler) ===|
C:\Spring_engine\develop\spring\rts\Lua\LuaOpenGL.cpp|4277|error: cast from 'const void*' to 'long unsigned int' loses precision [-fpermissive]|
C:\Spring_engine\develop\spring\rts\Lua\LuaOpenGL.cpp|4296|error: cast from 'const void*' to 'long unsigned int' loses precision [-fpermissive]|
C:\Spring_engine\develop\spring\rts\Lua\LuaOpenGL.cpp|4326|error: cast from 'const void*' to 'long unsigned int' loses precision [-fpermissive]|
rts\builds\legacy\CMakeFiles\engine-legacy.dir\build.make|2337|recipe for target 'rts/builds/legacy/CMakeFiles/engine-legacy.dir/__/__/Lua/LuaOpenGL.cpp.obj' failed|
CMakeFiles\Makefile2|2744|recipe for target 'rts/builds/legacy/CMakeFiles/engine-legacy.dir/all' failed|
CMakeFiles\Makefile2|2756|recipe for target 'rts/builds/legacy/CMakeFiles/engine-legacy.dir/rule' failed|
C:\Spring_engine\build\rts\builds\legacy\Makefile|156|recipe for target 'rts/builds/legacy/CMakeFiles/engine-legacy.dir/rule' failed|
||=== Build failed: 7 error(s), 0 warning(s) (2 minute(s), 39 second(s)) ===|
Steps To Reproducei'm building develop on windows, in codeblocks, with mingw. full build log is here: http://pastebin.com/ZNVtEzCM
Additional Informationall are caused by lines that read

GLuint q = (unsigned long int)lua_topointer(L, 1);
TagsNo tags attached.
Checked infolog.txt for Errors

Activities

cleanrock

2014-06-23 10:16

reporter   ~0013319

Last edited: 2014-06-23 10:55

Is it possible to use our lua_Hash (unsigned int == GLuint) here ?
LUA 5.2 have a lua_Unsigned type which would match GLuint.

abma

2014-06-26 17:54

administrator   ~0013366

Last edited: 2014-06-26 18:09

bug?

stores address:
https://github.com/spring/spring/blob/develop/rts/Lua/LuaOpenGL.cpp#L4264

but searches for GLuint...


changing q to GLuint* q and std::set<GLuint> occlusionQueries; should fix this?!

afaik spring uses lua 5.1.4

was CreateQuery, DeleteQuery, RunQuery, GetQuery used at all?

Issue History

Date Modified Username Field Change
2014-06-22 14:44 silentwings New Issue
2014-06-22 14:53 abma Summary compile error => mingw compile error: cast from 'const void*' to 'long unsigned int' loses precisio
2014-06-22 14:53 abma Summary mingw compile error: cast from 'const void*' to 'long unsigned int' loses precisio => mingw compile error: cast from 'const void*' to 'long unsigned int' loses precision
2014-06-23 10:16 cleanrock Note Added: 0013319
2014-06-23 10:55 cleanrock Note Edited: 0013319
2014-06-26 17:54 abma Note Added: 0013366
2014-06-26 17:55 abma Note Edited: 0013366
2014-06-26 18:00 abma Note Edited: 0013366
2014-06-26 18:08 abma Note Edited: 0013366
2014-06-26 18:08 abma Note Edited: 0013366
2014-06-26 18:09 abma Note Edited: 0013366
2014-06-26 22:43 Kloot Changeset attached => spring develop 090ead93
2014-06-26 22:43 Kloot Assigned To => Kloot
2014-06-26 22:43 Kloot Status new => resolved
2014-06-26 22:43 Kloot Resolution open => fixed