Page 1 of 1

Whole lotta compiler warnings, please advise

Posted: Mon Feb 21, 2005 03:53
by toysnob
I just built my app for the first time after including the CEGUI.h and d3d9renderer.h

Without actually referencing any of CEGUI's classes, just by including them, I have now gotten a bunch of compiler warnings. Here they are. I'm wondering if they are of any concern or if they can be ignored?


Code: Select all

cegui_mk2-0.2.0\cegui_mk2\include\CEGUIString.h(4859): warning C4244: 'return' : conversion from 'std::iterator<_Category,_Ty,_Diff,_Pointer,_Reference>::difference_type' to 'CEGUI::String::size_type', possible loss of data
        with
        [
            _Category=std::random_access_iterator_tag,
            _Ty=CEGUI::utf32,
            _Diff=ptrdiff_t,
            _Pointer=const CEGUI::utf32 *,
            _Reference=const CEGUI::utf32 &
        ]
cegui_mk2-0.2.0\cegui_mk2\include\CEGUIString.h(993): warning C4267: 'argument' : conversion from 'size_t' to 'CEGUI::String::size_type', possible loss of data
cegui_mk2-0.2.0\cegui_mk2\include\CEGUIString.h(1022): warning C4267: 'argument' : conversion from 'size_t' to 'CEGUI::String::size_type', possible loss of data
cegui_mk2-0.2.0\cegui_mk2\include\CEGUIString.h(1508): warning C4267: 'argument' : conversion from 'size_t' to 'CEGUI::String::size_type', possible loss of data
cegui_mk2-0.2.0\cegui_mk2\include\CEGUIString.h(1526): warning C4267: 'argument' : conversion from 'size_t' to 'CEGUI::String::size_type', possible loss of data
cegui_mk2-0.2.0\cegui_mk2\include\CEGUIString.h(1901): warning C4267: 'argument' : conversion from 'size_t' to 'CEGUI::String::size_type', possible loss of data
cegui_mk2-0.2.0\cegui_mk2\include\CEGUIString.h(1919): warning C4267: 'argument' : conversion from 'size_t' to 'CEGUI::String::size_type', possible loss of data
cegui_mk2-0.2.0\cegui_mk2\include\CEGUIString.h(2297): warning C4267: 'argument' : conversion from 'size_t' to 'CEGUI::String::size_type', possible loss of data
cegui_mk2-0.2.0\cegui_mk2\include\CEGUIString.h(3028): warning C4267: 'argument' : conversion from 'size_t' to 'CEGUI::String::size_type', possible loss of data
cegui_mk2-0.2.0\cegui_mk2\include\CEGUIString.h(3055): warning C4267: 'argument' : conversion from 'size_t' to 'CEGUI::String::size_type', possible loss of data
cegui_mk2-0.2.0\cegui_mk2\include\CEGUIString.h(3543): warning C4267: 'argument' : conversion from 'size_t' to 'CEGUI::String::size_type', possible loss of data
cegui_mk2-0.2.0\cegui_mk2\include\CEGUIString.h(3565): warning C4267: 'argument' : conversion from 'size_t' to 'CEGUI::String::size_type', possible loss of data
cegui_mk2-0.2.0\cegui_mk2\include\CEGUIString.h(4020): warning C4267: 'argument' : conversion from 'size_t' to 'CEGUI::String::size_type', possible loss of data
cegui_mk2-0.2.0\cegui_mk2\include\CEGUIString.h(4042): warning C4267: 'argument' : conversion from 'size_t' to 'CEGUI::String::size_type', possible loss of data
cegui_mk2-0.2.0\cegui_mk2\include\CEGUIString.h(4509): warning C4267: 'argument' : conversion from 'size_t' to 'CEGUI::String::size_type', possible loss of data
cegui_mk2-0.2.0\cegui_mk2\include\CEGUIString.h(4531): warning C4267: 'argument' : conversion from 'size_t' to 'CEGUI::String::size_type', possible loss of data
cegui_mk2-0.2.0\cegui_mk2\include\CEGUISingleton.h(61): warning C4311: 'type cast' : pointer truncation from 'CEGUI::Logger *' to 'int'
cegui_mk2-0.2.0\cegui_mk2\include\CEGUISingleton.h(61): warning C4311: 'type cast' : pointer truncation from 'CEGUI::Singleton<T> *' to 'int'
        with
        [
            T=CEGUI::Logger
        ]
cegui_mk2-0.2.0\cegui_mk2\include\CEGUISingleton.h(61): warning C4311: 'type cast' : pointer truncation from 'CEGUI::Singleton<T> *' to 'int'
        with
        [
            T=CEGUI::WindowFactoryManager
        ]
cegui_mk2-0.2.0\cegui_mk2\include\CEGUISingleton.h(61): warning C4311: 'type cast' : pointer truncation from 'CEGUI::Singleton<T> *' to 'int'
        with
        [
            T=CEGUI::WindowManager
        ]
cegui_mk2-0.2.0\cegui_mk2\include\CEGUISingleton.h(62): warning C4311: 'type cast' : pointer truncation from 'CEGUI::Singleton<T> *const ' to 'int'
        with
        [
            T=CEGUI::Logger
        ]
cegui_mk2-0.2.0\cegui_mk2\include\CEGUISingleton.h(62): warning C4311: 'type cast' : pointer truncation from 'CEGUI::Singleton<T> *const ' to 'int'
        with
        [
            T=CEGUI::WindowFactoryManager
        ]
cegui_mk2-0.2.0\cegui_mk2\include\CEGUISingleton.h(62): warning C4311: 'type cast' : pointer truncation from 'CEGUI::Singleton<T> *const ' to 'int'
        with
        [
            T=CEGUI::WindowManager
        ]
cegui_mk2-0.2.0\cegui_mk2\include\CEGUISingleton.h(61): warning C4311: 'type cast' : pointer truncation from 'CEGUI::WindowFactoryManager *' to 'int'
cegui_mk2-0.2.0\cegui_mk2\include\CEGUISingleton.h(61): warning C4311: 'type cast' : pointer truncation from 'CEGUI::WindowManager *' to 'int'
cegui_mk2-0.2.0\cegui_mk2\include\CEGUISingleton.h(62): warning C4312: 'type cast' : conversion from 'int' to 'CEGUI::Logger *' of greater size
cegui_mk2-0.2.0\cegui_mk2\include\CEGUISingleton.h(62): warning C4312: 'type cast' : conversion from 'int' to 'CEGUI::WindowFactoryManager *' of greater size
cegui_mk2-0.2.0\cegui_mk2\include\CEGUISingleton.h(62): warning C4312: 'type cast' : conversion from 'int' to 'CEGUI::WindowManager *' of greater size


Re: Whole lotta compiler warnings, please advise

Posted: Mon Feb 21, 2005 11:48
by lindquist
try to disable "detect 64 bit portability issues"

Re: Whole lotta compiler warnings, please advise

Posted: Mon Feb 21, 2005 22:32
by gcarlton
No, its a valid point. I personally turn the warnings level down before including any cegui header file, but it would be better if they were all clean up to level 4.

Re: Whole lotta compiler warnings, please advise

Posted: Tue Feb 22, 2005 10:07
by CrazyEddie
_mental_ is doing some work on 64Bit compatability, until I get such a system on which I can test stuff (which is unlikely for at least another 18 - 24 months), I will not be doing anything related to that myself.

I don't like warnings either, I have generally kept them to a minimum, but as for warnings at higher levels in VC++, I may get around to fixing them all at some stage, or I may not.

CE.