Author Topic: Warnings and Errors when building an NON-Unicode (ANSI) build of Code::Blocks  (Read 7362 times)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7789
    • My Best Post
Warnings and Errors when building an NON-Unicode (ANSI) build of Code::Blocks;
some side effect of Unicode build of wxWidgets disables/hides these warnings from GCC.

Tim S.

Warnings
Code
||=== AutoVersioning, default ===|
src\plugins\contrib\AutoVersioning\AutoVersioning.cpp||In member function 'void AutoVersioning::UpdateManifest()':|
src\plugins\contrib\AutoVersioning\AutoVersioning.cpp|730|warning: format '%d' expects type 'int', but argument 2 has type 'long int'|
src\plugins\contrib\AutoVersioning\AutoVersioning.cpp|730|warning: format '%d' expects type 'int', but argument 3 has type 'long int'|
src\plugins\contrib\AutoVersioning\AutoVersioning.cpp|730|warning: format '%d' expects type 'int', but argument 4 has type 'long int'|
||=== Exporter, wxPdfDocument ===|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp||In member function 'virtual void wxPdfDocument::PutPages()':|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp|1037|warning: format '%ld' expects type 'long int', but argument 2 has type 'size_t'|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp||In member function 'virtual void wxPdfDocument::PutShaders()':|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp|1205|warning: format '%ld' expects type 'long int', but argument 2 has type 'size_t'|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp||In member function 'virtual void wxPdfDocument::PutFonts()':|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp|1375|warning: format '%ld' expects type 'long int', but argument 2 has type 'size_t'|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp|1480|warning: format '%ld' expects type 'long int', but argument 2 has type 'size_t'|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp||In member function 'virtual void wxPdfDocument::PutTemplates()':|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp|1773|warning: format '%ld' expects type 'long int', but argument 2 has type 'size_t'|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp||In member function 'virtual void wxPdfDocument::PutPatterns()':|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp|2088|warning: format '%ld' expects type 'long int', but argument 2 has type 'size_t'|
||=== wxSmith, wxSmithLib ===|
src\plugins\contrib\wxSmith\wxwidgets\defitems\wxsimagelist.cpp||In member function 'void wxsImageList::StoreXpmData()':|
src\plugins\contrib\wxSmith\wxwidgets\defitems\wxsimagelist.cpp|162|warning: format '%d' expects type 'int', but argument 3 has type 'long int'|
src\plugins\contrib\wxSmith\wxwidgets\defitems\wxsimagelist.cpp|165|warning: format '%d' expects type 'int', but argument 3 has type 'long int'|

Errors
Code
src\plugins\contrib\FileManager\directorymonitor.cpp||In member function 'void DirMonitorThread::ReadChanges(DWORD, DWORD, MonData*)':|
src\plugins\contrib\FileManager\directorymonitor.cpp|473|error: call of overloaded 'wxString(WCHAR [1], long unsigned int)' is ambiguous|
wxWidgets-2.8.10-SJLJ\include\wx\string.h|1283|note: candidates are: wxString::wxString(const void*, const void*) <near match>|
wxWidgets-2.8.10-SJLJ\include\wx\string.h|694|note:                 wxString::wxString(size_t, wxChar) <near match>|
wxWidgets-2.8.10-SJLJ\include\wx\string.h|692|note:                 wxString::wxString(wxChar, size_t) <near match>|
||=== Build finished: 4 errors, 0 warnings ===|

||=== HexEditor, default ===|
src\plugins\contrib\HexEditor\HexEditPanel.cpp||In member function 'void HexEditPanel::OnDrawAreaKeyDown(wxKeyEvent&)':|
src\plugins\contrib\HexEditor\HexEditPanel.cpp|1033|error: 'class wxKeyEvent' has no member named 'GetUnicodeKey'|
||=== Build finished: 1 errors, 0 warnings ===|

||=== NassiShneiderman, default ===|
src\plugins\contrib\NassiShneiderman\CParser.cpp||In member function 'bool NassiEditorPanel::ParseC(const wxString&)':|
src\plugins\contrib\NassiShneiderman\CParser.cpp|26|error: no matching function for call to 'wxString::wc_str() const'|
wxWidgets-2.8.10-SJLJ\include\wx\string.h|942|note: candidate is: const wxWCharBuffer wxString::wc_str(const wxMBConv&) const|
||=== Build finished: 2 errors, 0 warnings ===|

||=== SpellChecker, wxSpellChecker ===|
src\plugins\contrib\SpellChecker\HunspellInterface.cpp||In member function 'virtual wxArrayString HunspellInterface::GetSuggestions(const wxString&)':|
src\plugins\contrib\SpellChecker\HunspellInterface.cpp|201|error: ambiguous overload for 'operator!=' in 'misspelledWordCharBuffer != 0'|
src\plugins\contrib\SpellChecker\HunspellInterface.cpp|201|note: candidates are: operator!=(const char*, const char*) <built-in>|
wxWidgets-2.8.10-SJLJ\include\wx\string.h|1566|note:                 bool operator!=(const wxString&, const wxString&)|
wxWidgets-2.8.10-SJLJ\include\wx\string.h|1568|note:                 bool operator!=(const wxString&, const wxChar*)|
wxWidgets-2.8.10-SJLJ\include\wx\string.h|1570|note:                 bool operator!=(const wxChar*, const wxString&)|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build finished: 5 errors, 0 warnings ===|


||=== Tools Plus Plugin, default ===|
src\plugins\contrib\ToolsPlus\PipedProcessCtrl.cpp||In member function 'void PipedProcessCtrl::OnUserInput(wxKeyEvent&)':|
src\plugins\contrib\ToolsPlus\PipedProcessCtrl.cpp|262|error: 'class wxKeyEvent' has no member named 'GetUnicodeKey'|
||=== Build finished: 1 errors, 34 warnings ===|
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Code
||=== AutoVersioning, default ===|
src\plugins\contrib\AutoVersioning\AutoVersioning.cpp||In member function 'void AutoVersioning::UpdateManifest()':|
src\plugins\contrib\AutoVersioning\AutoVersioning.cpp|730|warning: format '%d' expects type 'int', but argument 2 has type 'long int'|
src\plugins\contrib\AutoVersioning\AutoVersioning.cpp|730|warning: format '%d' expects type 'int', but argument 3 has type 'long int'|
src\plugins\contrib\AutoVersioning\AutoVersioning.cpp|730|warning: format '%d' expects type 'int', but argument 4 has type 'long int'|
I have a fix for these, I will commit them tonight.

Code
||=== Exporter, wxPdfDocument ===|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp||In member function 'virtual void wxPdfDocument::PutPages()':|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp|1037|warning: format '%ld' expects type 'long int', but argument 2 has type 'size_t'|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp||In member function 'virtual void wxPdfDocument::PutShaders()':|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp|1205|warning: format '%ld' expects type 'long int', but argument 2 has type 'size_t'|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp||In member function 'virtual void wxPdfDocument::PutFonts()':|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp|1375|warning: format '%ld' expects type 'long int', but argument 2 has type 'size_t'|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp|1480|warning: format '%ld' expects type 'long int', but argument 2 has type 'size_t'|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp||In member function 'virtual void wxPdfDocument::PutTemplates()':|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp|1773|warning: format '%ld' expects type 'long int', but argument 2 has type 'size_t'|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp||In member function 'virtual void wxPdfDocument::PutPatterns()':|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp|2088|warning: format '%ld' expects type 'long int', but argument 2 has type 'size_t'|
These are in the library. If you have time you can report them to the maintainer of wxPdfDocument, there is no point in fixing it in our svn.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline utelle

  • Single posting newcomer
  • *
  • Posts: 9
Code
||=== Exporter, wxPdfDocument ===|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp||In member function 'virtual void wxPdfDocument::PutPages()':|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp|1037|warning: format '%ld' expects type 'long int', but argument 2 has type 'size_t'|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp||In member function 'virtual void wxPdfDocument::PutShaders()':|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp|1205|warning: format '%ld' expects type 'long int', but argument 2 has type 'size_t'|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp||In member function 'virtual void wxPdfDocument::PutFonts()':|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp|1375|warning: format '%ld' expects type 'long int', but argument 2 has type 'size_t'|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp|1480|warning: format '%ld' expects type 'long int', but argument 2 has type 'size_t'|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp||In member function 'virtual void wxPdfDocument::PutTemplates()':|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp|1773|warning: format '%ld' expects type 'long int', but argument 2 has type 'size_t'|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp||In member function 'virtual void wxPdfDocument::PutPatterns()':|
src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfkernel.cpp|2088|warning: format '%ld' expects type 'long int', but argument 2 has type 'size_t'|
These are in the library. If you have time you can report them to the maintainer of wxPdfDocument, there is no point in fixing it in our svn.

I'll address these warnings in the next release of wxPdfDocument. wxPdfDocument version 0.9.2 (fixing them) is scheduled for early September.

Regards,

Ulrich