Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] wxCatapult: Fix warnings + the issues reported in e-mails entitled "code analysis complete - could be some false positives" [sf#483] #16

Open
openMSX-import opened this issue Jun 24, 2015 · 9 comments

Comments

@openMSX-import
Copy link

Reported by joxy on 2013-07-30 03:54 UTC

@openMSX-import
Copy link
Author

Commented by joxy on 2013-08-02 08:01 UTC

C6011 Dereferencing null pointer
Dereferencing NULL pointer 'm_str'.

Line 127: 'm_str' may be NULL
Line 127: 'm_str' is dereferenced, but may still be NULL

wxCatapult - buffer.h (Line 127)

not fixed, where is this?

C6011 Dereferencing null pointer
Dereferencing NULL pointer 'm_str'.

Line 134: 'm_str' may be NULL
Line 134: 'm_str' is dereferenced, but may still be NULL

wxCatapult - buffer.h (Line 134)

not fixed, where is this?

C28251 Inconsistent annotation for function: this instance has an error

Inconsistent annotation for 'WinMain': this instance has no annotations. See c:\program files (x86)\windows kits\8.0\include\um\winbase.h(2188).
wxCatapult - wxcatapultapp.cpp (Line 28)

not fixed, what is this about?

all other was fixed

tested slightly on linux (not paying attn to what was fixed, as these probably don't trigger)

test on vc32 and mingw32 pending

@openMSX-import
Copy link
Author

Commented by joxy on 2013-08-02 08:04 UTC
x64 warnings not yet fixed

@openMSX-import
Copy link
Author

Commented by joxy on 2013-08-02 09:10 UTC
Until these three warnings ([1]) are understood by someone, I mark these 3 warnings as "undecipherable" and "closed-invalid".

[1] https://sourceforge.net/p/openmsx/bugs/483/#2527 (the comment above)

@openMSX-import
Copy link
Author

Commented by joxy on 2013-08-02 09:53 UTC
mingw32 warnings:

Compiling VideoControlPage...
src/VideoControlPage.cpp: In member function 'void VideoControlPage::OnChangeBlu
r(wxScrollEvent&)':
src/VideoControlPage.cpp:181:57: warning: format '%ld' expects argument of type
'long int', but argument 2 has type 'int' [-Wformat]
src/VideoControlPage.cpp: In member function 'void VideoControlPage::OnChangeGlo
w(wxScrollEvent&)':
src/VideoControlPage.cpp:188:57: warning: format '%ld' expects argument of type
'long int', but argument 2 has type 'int' [-Wformat]
src/VideoControlPage.cpp: In member function 'void VideoControlPage::OnChangeSca
nlines(wxScrollEvent&)':
src/VideoControlPage.cpp:202:57: warning: format '%ld' expects argument of type
'long int', but argument 2 has type 'int' [-Wformat]
Compiling AudioControlPage...
Compiling MiscControlPage...
src/MiscControlPage.cpp: In member function 'void MiscControlPage::OnSpeedChange
(wxScrollEvent&)':
src/MiscControlPage.cpp:178:62: warning: format '%ld' expects argument of type '
long int', but argument 2 has type 'int' [-Wformat]
src/MiscControlPage.cpp: In member function 'void MiscControlPage::OnMaxFrameSki
pChange(wxScrollEvent&)':
src/MiscControlPage.cpp:209:61: warning: format '%ld' expects argument of type '
long int', but argument 2 has type 'int' [-Wformat]
src/MiscControlPage.cpp: In member function 'void MiscControlPage::OnMinFrameSki
pChange(wxScrollEvent&)':
src/MiscControlPage.cpp:216:61: warning: format '%ld' expects argument of type '
long int', but argument 2 has type 'int' [-Wformat]
src/MiscControlPage.cpp: In member function 'void MiscControlPage::OnChangeRenSh
aTurbo(wxScrollEvent&)':
src/MiscControlPage.cpp:542:45: warning: format '%ld' expects argument of type '
long int', but argument 2 has type 'int' [-Wformat]

@openMSX-import
Copy link
Author

Updated by joxy on 2013-08-02 09:58 UTC

  • summary: wxCatapult: Fix the issues reported in e-mails entitled "code analysis complete - could be some false positives" --> wxCatapult: Fix warnings + the issues reported in e-mails entitled "code analysis complete - could be some false positives"

@openMSX-import
Copy link
Author

Commented by joxy on 2013-08-02 10:23 UTC
tested slightly on mingw32, all ok for now.

@openMSX-import
Copy link
Author

Commented by m9710797 on 2013-08-02 10:26 UTC
I'm not sure why you put these mingw32 warnings in this bug report (seems a completely different issue to me). But the problem there is a mismatch between the "%ld" format specifier (stands for print long-decimal). And the type of the actually passed argument (getInt() returns a 'int'). The fix is to change the format specifier to "%d" (this prints normal ints).

@openMSX-import
Copy link
Author

Commented by joxy on 2013-08-04 07:41 UTC

  1. Wouter: I collect all warnings here, regardless of their nature.
  2. Vampier wrote: btw buffer.h c:\compiler\openmsx-wxcatapult\derived\3rdparty\src\wxmsw-2.8.12\include\wx\buffer.h

@openMSX-import
Copy link
Author

Commented by joxy on 2013-08-04 07:42 UTC
Regarding buffer.h:

(16:32:18) egp_: this should be submitted to wxWidgets bug tracker
(16:35:28) Vampier: then wxwidgets tells us to use the latest version
(16:35:29) Vampier: :)
(16:36:36) egp_: they should fix it in a stable version
(16:36:47) egp_: in a 2.8.x branch
(16:37:37) egp_: I am not gonna use the development version of wx (2.9.x)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant