Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: rickg22 on June 01, 2007, 07:21:57 am

Title: signed / unsigned warnings report of the day
Post by: rickg22 on June 01, 2007, 07:21:57 am
This is the result of my compilation of CB nightly. Since not everyone notices these warnings, i thought it'd be useful to share them.

Code
:: === Code::Blocks, sdk ===
G:\projects\codeblocks\src\sdk\editarrayfiledlg.cpp:70: warning: comparison between signed and unsigned integer expressions
G:\projects\codeblocks\src\sdk\editarrayorderdlg.cpp:70: warning: comparison between signed and unsigned integer expressions
G:\projects\codeblocks\src\sdk\editarrayorderdlg.cpp:92: warning: comparison between signed and unsigned integer expressions
G:\projects\codeblocks\src\sdk\editarrayorderdlg.cpp:108: warning: comparison between signed and unsigned integer expressions
G:\projects\codeblocks\src\sdk\editarraystringdlg.cpp:60: warning: comparison between signed and unsigned integer expressions
G:\projects\codeblocks\src\sdk\multiselectdlg.cpp:82: warning: comparison between signed and unsigned integer expressions
G:\projects\codeblocks\src\sdk\multiselectdlg.cpp:96: warning: comparison between signed and unsigned integer expressions
G:\projects\codeblocks\src\sdk\multiselectdlg.cpp:108: warning: comparison between signed and unsigned integer expressions
G:\projects\codeblocks\src\sdk\multiselectdlg.cpp:122: warning: comparison between signed and unsigned integer expressions
G:\projects\codeblocks\src\sdk\multiselectdlg.cpp:170: warning: comparison between signed and unsigned integer expressions
G:\projects\codeblocks\src\sdk\multiselectdlg.cpp:180: warning: comparison between signed and unsigned integer expressions
G:\projects\codeblocks\src\sdk\multiselectdlg.cpp:190: warning: comparison between signed and unsigned integer expressions
G:\projects\codeblocks\src\sdk\pluginmanager.cpp:920: warning: 'elem' might be used uninitialized in this function
G:\projects\codeblocks\src\sdk\projectdepsdlg.cpp:76: warning: comparison between signed and unsigned integer expressions
G:\projects\codeblocks\src\sdk\projectfileoptionsdlg.cpp:349: warning: comparison between signed and unsigned integer expressions
G:\projects\codeblocks\src\sdk\projectoptionsdlg.cpp:757: warning: comparison between signed and unsigned integer expressions
G:\projects\codeblocks\src\sdk\replacedlg.cpp:151: warning: comparison between signed and unsigned integer expressions
G:\MinGw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\stl_tree.h:1029: warning: '__top' might be used uninitialized in this function
G:\MinGw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\stl_tree.h:365: warning: '__tmp' might be used uninitialized in this function
G:\projects\codeblocks\src\sdk\virtualbuildtargetsdlg.cpp:60: warning: comparison between signed and unsigned integer expressions
:: === Code::Blocks, src ===
G:\projects\codeblocks\src\src\app.cpp:496: warning: 'frame' might be used uninitialized in this function
G:\projects\codeblocks\src\src\associations.cpp:326: warning: comparison between signed and unsigned integer expressions
G:\projects\codeblocks\src\src\compilersettingsdlg.cpp:221: warning: comparison between signed and unsigned integer expressions
G:\projects\codeblocks\src\src\environmentsettingsdlg.cpp:423: warning: comparison between signed and unsigned integer expressions
G:\projects\codeblocks\src\src\main.cpp:661: warning: 'mgr' might be used uninitialized in this function
:: === Code::Blocks, Compiler ===
G:\projects\codeblocks\src\plugins\compilergcc\compileroptionsdlg.cpp:860: warning: comparison between signed and unsigned integer expressions
G:\projects\codeblocks\src\plugins\compilergcc\compileroptionsdlg.cpp:1410: warning: comparison between signed and unsigned integer expressions
G:\projects\codeblocks\src\plugins\compilergcc\compileroptionsdlg.cpp:1508: warning: comparison between signed and unsigned integer expressions
G:\projects\codeblocks\src\plugins\compilergcc\compileroptionsdlg.cpp:1751: warning: comparison between signed and unsigned integer expressions
:: === Code::Blocks, Debugger ===
G:\projects\codeblocks\src\plugins\debuggergdb\debuggeroptionsprjdlg.cpp:127: warning: comparison between signed and unsigned integer expressions
G:\MinGw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\stl_uninitialized.h:82: warning: '__cur' might be used uninitialized in this function
G:\MinGw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\stl_vector.h:715: warning: '__result' might be used uninitialized in this function
G:\MinGw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\stl_uninitialized.h:82: warning: '__cur' might be used uninitialized in this function
G:\MinGw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\stl_uninitialized.h:82: warning: '__cur' might be used uninitialized in this function
G:\MinGw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\stl_uninitialized.h:82: warning: '__cur' might be used uninitialized in this function
G:\MinGw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\stl_uninitialized.h:82: warning: '__cur' might be used uninitialized in this function
G:\MinGw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\stl_uninitialized.h:82: warning: '__cur' might be used uninitialized in this function
G:\MinGw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\stl_uninitialized.h:82: warning: '__cur' might be used uninitialized in this function
G:\MinGw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\stl_uninitialized.h:82: warning: '__cur' might be used uninitialized in this function
G:\MinGw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\stl_uninitialized.h:82: warning: '__cur' might be used uninitialized in this function
G:\MinGw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\stl_uninitialized.h:82: warning: '__cur' might be used uninitialized in this function
G:\MinGw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\stl_uninitialized.h:82: warning: '__cur' might be used uninitialized in this function
G:\MinGw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\stl_uninitialized.h:82: warning: '__cur' might be used uninitialized in this function
G:\MinGw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\stl_uninitialized.h:82: warning: '__cur' might be used uninitialized in this function
G:\MinGw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\stl_uninitialized.h:82: warning: '__cur' might be used uninitialized in this function
G:\projects\codeblocks\src\plugins\debuggergdb\editwatchesdlg.cpp:96: warning: comparison between signed and unsigned integer expressions
:: === Code::Blocks, Code-completion ===
G:\projects\codeblocks\src\plugins\codecompletion\ccoptionsprjdlg.cpp:125: warning: comparison between signed and unsigned integer expressions
G:\projects\codeblocks\src\plugins\codecompletion\insertclassmethoddlg.cpp:45: warning: comparison between signed and unsigned integer expressions
G:\MinGw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\stl_uninitialized.h:82: warning: '__cur' might be used uninitialized in this function
G:\MinGw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\stl_uninitialized.h:82: warning: '__cur' might be used uninitialized in this function
:: === Code::Blocks, To-do ===
G:\projects\codeblocks\src\plugins\todo\addtododlg.cpp:102: warning: comparison between signed and unsigned integer expressions
G:\projects\codeblocks\src\plugins\todo\addtododlg.cpp:155: warning: comparison between signed and unsigned integer expressions
:: === Build finished: 0 errors, 52 warnings ===
Title: Re: signed / unsigned warnings report of the day
Post by: Biplab on June 01, 2007, 07:53:12 am
I'll clean these warnings. :)
Title: Re: signed / unsigned warnings report of the day
Post by: Deschamps on June 01, 2007, 12:16:34 pm
Quote from: rickg22
This is the result of my compilation of CB nightly. Since not everyone notices these warnings, i thought it'd be useful to share them (..)

In relation to those "uninitialized" warnings, i recently asked for them in other forum, and it seems that could be a problem (bug?) with g++ 3.4.x, because versions 4.1.x and above don't produce those warnings when compiling the same source code.
Title: Re: signed / unsigned warnings report of the day
Post by: Pecan on June 01, 2007, 01:06:20 pm
I'll clean these warnings. :)

Be careful here. Choose your poison.

Correcting size_t/int warnings on wx2.8.4 causes them  to appear on Linux with wx2.6.3.

Correcting them on Linux with wx2.6.3 causes them to re-appear on MSW with wx2.8.4
Title: Re: signed / unsigned warnings report of the day
Post by: Biplab on June 01, 2007, 01:07:53 pm
Thanks for the hints. I've to check it.
Title: Re: signed / unsigned warnings report of the day
Post by: Biplab on June 01, 2007, 01:26:10 pm
Be careful here. Choose your poison.

A good antidote has been applied. ;)

I've just tested it. They work fine both on Windows and Linux with wx 2.6 or 2.8. :)