2007-12-16, 06:15
I've looked through all the warnings that GCC generates when compiling the current SVN for the linuxport with the -Wall flag set.
The following warnings can be fixed with very little effort:
These variables look like they can be safely deleted.
Just add a newline at the end of the files.
These should be probably be "%lu" instead of "%d".
It doesn't really, maybe just return 0 or something to shut up gcc?
In UnrarXlib:
Both HighDist and pos should be commented out as well.
This is only referenced from commented out code, it should be commented out as well.
sm, sc, and sa should be inside the _WIN_32 ifdef since they're only referenced from there.
I think "%lu" should be "%d", but I'm not sure since it's a custom type.
This should probably be commented out as well.
None of these are ever used.
Neither are mentioned again in the function.
Never used.
Should probably read:
These are all pretty trivial, so I doubt any developers will care that much about them. However, fixing/silencing these may make finding "real" warnings easier.
The following warnings can be fixed with very little effort:
Code:
GUIFont.cpp:51: warning: unused variable ‘nw’
GUIFont.cpp:51: warning: unused variable ‘nh’
GUIWindowVideoNav.cpp:1052: warning: unused variable ‘bDownload’
GUITextBox.cpp:483: warning: unused variable ‘size’
Code:
FileCache.h:57:2: warning: no newline at end of file
Platinum/Source/Core/PltService.cpp:685:2: warning: no newline at end of file
Code:
VideoDatabase.cpp:3790: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘long unsigned int’
VideoDatabase.cpp:3881: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘long unsigned int’
Code:
XBMChttp.cpp:2350: warning: control reaches end of non-void function
In UnrarXlib:
Code:
file.cpp: In member function ‘Int64 File::Tell()’:
file.cpp:501: warning: unused variable ‘HighDist’
file.cpp:503: warning: unused variable ‘pos’
Code:
file.cpp:8: warning: ‘CreatedFiles’ defined but not used
Code:
filefn.cpp:111: warning: unused variable ‘sm’
filefn.cpp:112: warning: unused variable ‘sc’
filefn.cpp:113: warning: unused variable ‘sa’
Code:
Thread.cpp:97: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 4 has type ‘Uint32’
Code:
pathfn.cpp:8: warning: unused variable ‘Found’
Code:
rar.cpp:349: warning: unused variable ‘TitleShown’
rar.cpp:346: warning: unused variable ‘TotalPackSize’
rar.cpp:346: warning: unused variable ‘TotalUnpSize’
rar.cpp:339: warning: unused variable ‘FileMatched’
rar.cpp:479: warning: unused variable ‘pPrev’
rar.cpp:480: warning: unused variable ‘TitleShown’
rar.cpp:473: warning: unused variable ‘FileMatched’
rar.cpp:475: warning: unused variable ‘TotalPackSize’
rar.cpp:475: warning: unused variable ‘TotalUnpSize’
Code:
DVDOverlayRenderer.cpp:56: warning: unused variable ‘ey’
DVDOverlayRenderer.cpp:57: warning: unused variable ‘er’
Code:
winxml.cpp:157: warning: unused variable ‘bRefresh’
CDDARipper.cpp:204: warning: unused variable ‘iTrack’
Code:
EncoderWav.cpp:75: warning: passing NULL to non-pointer argument 2 of ‘DWORD SetFilePointer(CXHandle*, LONG, LONG*, DWORD)’
SetFilePointer(m_hFile, NULL, NULL, FILE_BEGIN);
Code:
SetFilePointer(m_hFile, 0, NULL, FILE_BEGIN);
These are all pretty trivial, so I doubt any developers will care that much about them. However, fixing/silencing these may make finding "real" warnings easier.