Static analysis

Ok, y’all,

The buildbot now runs Clang’s static analyzer on every commit to SDL:

If you go to our waterfall…

 https://buildbot.libsdl.org/waterfall

…you’ll see an “uploading” section on the sdl-macosx-static-analysis
column. That’ll give you a detailed report of the more subtle bugs in SDL.

Right now it’s only checking things that Mac OS X compiles, but I plan
to expand the coverage to other platforms and targets, too.

If anyone’s bored, patches for any of those current 117 bugs are
welcome. If you have clang installed on your platform, Mac OS X or
otherwise, you can run ./build-scripts/checker-buildbot.sh to generate
this report on your own machine (if it successfully runs, point your web
browser at analysis/index.html in the root of your SDL clone, it’s the
same thing that’s uploaded to the Buildbot, but perhaps you’ll run it on
Linux or FreeBSD or whatever instead!).

I’m looking into Visual Studio’s /ANALYZE magic when I get more free
time, too.

Comments and feedback welcome!

–ryan.

Hi Ryan,

I just noticed (from the buildbot results) that there is still quite a
few warnings related to deprecated API usages on OS X. So I made these
patches to appease the compiler. I haven’t really tested these but
they are all based on existing code or recommended replacement from
Apple. Please let me know if you have found any problem with these.

  • JiangOn Wed, Mar 19, 2014 at 8:51 PM, Ryan C. Gordon wrote:

Ok, y’all,

The buildbot now runs Clang’s static analyzer on every commit to SDL:

If you go to our waterfall…

https://buildbot.libsdl.org/waterfall

…you’ll see an “uploading” section on the sdl-macosx-static-analysis
column. That’ll give you a detailed report of the more subtle bugs in SDL.

Right now it’s only checking things that Mac OS X compiles, but I plan to
expand the coverage to other platforms and targets, too.

If anyone’s bored, patches for any of those current 117 bugs are welcome. If
you have clang installed on your platform, Mac OS X or otherwise, you can
run ./build-scripts/checker-buildbot.sh to generate this report on your own
machine (if it successfully runs, point your web browser at
analysis/index.html in the root of your SDL clone, it’s the same thing
that’s uploaded to the Buildbot, but perhaps you’ll run it on Linux or
FreeBSD or whatever instead!).

I’m looking into Visual Studio’s /ANALYZE magic when I get more free time,
too.

Comments and feedback welcome!

–ryan.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
-------------- next part --------------
A non-text attachment was scrubbed…
Name: 0001-Replace-deprecated-UpdateSystemActivity-API-with-IOK.patch
Type: application/octet-stream
Size: 4097 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20140319/d8b73272/attachment-0005.obj
-------------- next part --------------
A non-text attachment was scrubbed…
Name: 0002-Replace-deprecated-Process-Manager-API-with-Cocoa-on.patch
Type: application/octet-stream
Size: 1205 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20140319/d8b73272/attachment-0006.obj
-------------- next part --------------
A non-text attachment was scrubbed…
Name: 0003-Replace-deprecated-CGSetLocalEventsSuppressionInterv.patch
Type: application/octet-stream
Size: 4382 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20140319/d8b73272/attachment-0007.obj
-------------- next part --------------
A non-text attachment was scrubbed…
Name: 0004-Replace-deprecated-Gestalt-with-runtime-AppKit-versi.patch
Type: application/octet-stream
Size: 9486 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20140319/d8b73272/attachment-0008.obj
-------------- next part --------------
A non-text attachment was scrubbed…
Name: 0005-Replace-deprecated-CGDisplayIOServicePort-call.patch
Type: application/octet-stream
Size: 3050 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20140319/d8b73272/attachment-0009.obj

Two more warning fixes.On Wed, Mar 19, 2014 at 10:32 PM, Jiang Jiang <@Jiang_Jiang> wrote:

Hi Ryan,

I just noticed (from the buildbot results) that there is still quite a
few warnings related to deprecated API usages on OS X. So I made these
patches to appease the compiler. I haven’t really tested these but
they are all based on existing code or recommended replacement from
Apple. Please let me know if you have found any problem with these.

  • Jiang

On Wed, Mar 19, 2014 at 8:51 PM, Ryan C. Gordon wrote:

Ok, y’all,

The buildbot now runs Clang’s static analyzer on every commit to SDL:

If you go to our waterfall…

https://buildbot.libsdl.org/waterfall

…you’ll see an “uploading” section on the sdl-macosx-static-analysis
column. That’ll give you a detailed report of the more subtle bugs in SDL.

Right now it’s only checking things that Mac OS X compiles, but I plan to
expand the coverage to other platforms and targets, too.

If anyone’s bored, patches for any of those current 117 bugs are welcome. If
you have clang installed on your platform, Mac OS X or otherwise, you can
run ./build-scripts/checker-buildbot.sh to generate this report on your own
machine (if it successfully runs, point your web browser at
analysis/index.html in the root of your SDL clone, it’s the same thing
that’s uploaded to the Buildbot, but perhaps you’ll run it on Linux or
FreeBSD or whatever instead!).

I’m looking into Visual Studio’s /ANALYZE magic when I get more free time,
too.

Comments and feedback welcome!

–ryan.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
-------------- next part --------------
A non-text attachment was scrubbed…
Name: 0001-Replace-deprecated-AudioComponent-code.patch
Type: application/octet-stream
Size: 3230 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20140319/bf7499d4/attachment.obj
-------------- next part --------------
A non-text attachment was scrubbed…
Name: 0002-Make-FFERR-and-HRESULT-comparison-happy.patch
Type: application/octet-stream
Size: 3859 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20140319/bf7499d4/attachment-0001.obj

Awesome!

Since you have the setup of a new buildbot pipeline fresh in your mind,
what would it take to add a slot for running ‘testautomation’?On 3/19/2014 12:51 PM, Ryan C. Gordon wrote:

Ok, y’all,

The buildbot now runs Clang’s static analyzer on every commit to SDL:

If you go to our waterfall…

https://buildbot.libsdl.org/waterfall

…you’ll see an “uploading” section on the sdl-macosx-static-analysis
column. That’ll give you a detailed report of the more subtle bugs in
SDL.

Right now it’s only checking things that Mac OS X compiles, but I plan
to expand the coverage to other platforms and targets, too.

If anyone’s bored, patches for any of those current 117 bugs are
welcome. If you have clang installed on your platform, Mac OS X or
otherwise, you can run ./build-scripts/checker-buildbot.sh to generate
this report on your own machine (if it successfully runs, point your
web browser at analysis/index.html in the root of your SDL clone, it’s
the same thing that’s uploaded to the Buildbot, but perhaps you’ll run
it on Linux or FreeBSD or whatever instead!).

I’m looking into Visual Studio’s /ANALYZE magic when I get more free
time, too.

Comments and feedback welcome!

–ryan.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Since you have the setup of a new buildbot pipeline fresh in your mind,
what would it take to add a slot for running ‘testautomation’?

Probably nontrivial. Lots of these systems aren’t even running X servers
(etc), and all of them are virtualized under vmware, which may cause
other issues.

–ryan.

I just noticed (from the buildbot results) that there is still quite a
few warnings related to deprecated API usages on OS X. So I made these
patches to appease the compiler. I haven’t really tested these but
they are all based on existing code or recommended replacement from
Apple. Please let me know if you have found any problem with these.

The big problem is that we’re using some of these APIs because we still
support 10.5, so we would need to make sure we don’t lose those systems.
It’s an awkward tapdance.

This is a good set of patches, but I’d need to keep 10.5 compatibility.
I’m not sure the right way to swing that here, yet.

–ryan.

Right, I didn’t realize that. I thought SDL 2.0 is for OS X 10.6 and up.

Any plans for dropping 10.5 support in a version like 2.1? or is there
any criteria for keeping 10.5 support? According statistics like
http://update.omnigroup.com 10.5 users are fairly low these days.

  • JiangOn Thu, Mar 20, 2014 at 4:11 AM, Ryan C. Gordon wrote:

The big problem is that we’re using some of these APIs because we still
support 10.5, so we would need to make sure we don’t lose those systems.
It’s an awkward tapdance.

This is a good set of patches, but I’d need to keep 10.5 compatibility. I’m
not sure the right way to swing that here, yet.

BTW, the following patches should still work on 10.5:

Replace deprecated Gestalt() with runtime AppKit version check
Replace deprecated CGSetLocalEventsSuppressionInterval
Replace deprecated CGDisplayIOServicePort() call
Make FFERR and HRESULT comparison happy

  • JiangOn Thu, Mar 20, 2014 at 7:58 AM, Jiang Jiang <@Jiang_Jiang> wrote:

On Thu, Mar 20, 2014 at 4:11 AM, Ryan C. Gordon wrote:

The big problem is that we’re using some of these APIs because we still
support 10.5, so we would need to make sure we don’t lose those systems.
It’s an awkward tapdance.

This is a good set of patches, but I’d need to keep 10.5 compatibility. I’m
not sure the right way to swing that here, yet.

SDL is used by Steam, so as long as Steam supports Mac OS X 10.5, SDL will
too. :slight_smile:

There are no current plans to remove Mac OS X 10.5 support.On Wed, Mar 19, 2014 at 11:58 PM, Jiang Jiang wrote:

On Thu, Mar 20, 2014 at 4:11 AM, Ryan C. Gordon wrote:

The big problem is that we’re using some of these APIs because we still
support 10.5, so we would need to make sure we don’t lose those systems.
It’s an awkward tapdance.

This is a good set of patches, but I’d need to keep 10.5 compatibility.
I’m
not sure the right way to swing that here, yet.

Right, I didn’t realize that. I thought SDL 2.0 is for OS X 10.6 and up.

Any plans for dropping 10.5 support in a version like 2.1? or is there
any criteria for keeping 10.5 support? According statistics like
http://update.omnigroup.com 10.5 users are fairly low these days.

  • Jiang

SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

BTW, the following patches should still work on 10.5:

I’ll take a look at these this week, thanks!

–ryan.

So Steam dropped support for Mac OS 10.5 about 6 months ago ? maybe SDL?s minimum OS support could be re-evaluated after 2.0.4 ships? As someone who submits patches for the Mac backend it?s getting tougher (and messier) to make sure new code works on 10.5.

Steam?s Mac OS 10.6 usage share[1] has also dropped by over 50% in the past 6 months (down to about 3.5% of all OS X usage), although I don?t suggest dropping support for 10.6 anytime soon, especially since Steam still supports it.

[1]: http://store.steampowered.com/hwsurvey?platform=macOn Mar 22, 2014, at 12:25 AM, Sam Lantinga wrote:

SDL is used by Steam, so as long as Steam supports Mac OS X 10.5, SDL will too. :slight_smile:

There are no current plans to remove Mac OS X 10.5 support.

On Wed, Mar 19, 2014 at 11:58 PM, Jiang Jiang wrote:
On Thu, Mar 20, 2014 at 4:11 AM, Ryan C. Gordon wrote:

The big problem is that we’re using some of these APIs because we still
support 10.5, so we would need to make sure we don’t lose those systems.
It’s an awkward tapdance.

This is a good set of patches, but I’d need to keep 10.5 compatibility. I’m
not sure the right way to swing that here, yet.

Right, I didn’t realize that. I thought SDL 2.0 is for OS X 10.6 and up.

Any plans for dropping 10.5 support in a version like 2.1? or is there
any criteria for keeping 10.5 support? According statistics like
http://update.omnigroup.com 10.5 users are fairly low these days.

  • Jiang

SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I thought we already did drop 10.5?

JosephSent via mobile

On Jan 28, 2015, at 18:14, Alex Szpakowski wrote:

So Steam dropped support for Mac OS 10.5 about 6 months ago ? maybe SDL?s minimum OS support could be re-evaluated after 2.0.4 ships? As someone who submits patches for the Mac backend it?s getting tougher (and messier) to make sure new code works on 10.5.

Steam?s Mac OS 10.6 usage share1 has also dropped by over 50% in the past 6 months (down to about 3.5% of all OS X usage), although I don?t suggest dropping support for 10.6 anytime soon, especially since Steam still supports it.

On Mar 22, 2014, at 12:25 AM, Sam Lantinga wrote:

SDL is used by Steam, so as long as Steam supports Mac OS X 10.5, SDL will too. :slight_smile:

There are no current plans to remove Mac OS X 10.5 support.

On Wed, Mar 19, 2014 at 11:58 PM, Jiang Jiang wrote:
On Thu, Mar 20, 2014 at 4:11 AM, Ryan C. Gordon wrote:

The big problem is that we’re using some of these APIs because we still
support 10.5, so we would need to make sure we don’t lose those systems.
It’s an awkward tapdance.

This is a good set of patches, but I’d need to keep 10.5 compatibility. I’m
not sure the right way to swing that here, yet.

Right, I didn’t realize that. I thought SDL 2.0 is for OS X 10.6 and up.

Any plans for dropping 10.5 support in a version like 2.1? or is there
any criteria for keeping 10.5 support? According statistics like
http://update.omnigroup.com 10.5 users are fairly low these days.

  • Jiang

SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

You need a newer version to build SDL but the generated library will
work on 10.5

2015-01-29 2:07 GMT-03:00, T. Joseph Carter :> I thought we already did drop 10.5?

Joseph
Sent via mobile

On Jan 28, 2015, at 18:14, Alex Szpakowski wrote:

So Steam dropped support for Mac OS 10.5 about 6 months ago ? maybe SDL?s
minimum OS support could be re-evaluated after 2.0.4 ships? As someone who
submits patches for the Mac backend it?s getting tougher (and messier) to
make sure new code works on 10.5.

Steam?s Mac OS 10.6 usage share1 has also dropped by over 50% in the
past 6 months (down to about 3.5% of all OS X usage), although I don?t
suggest dropping support for 10.6 anytime soon, especially since Steam
still supports it.

On Mar 22, 2014, at 12:25 AM, Sam Lantinga wrote:

SDL is used by Steam, so as long as Steam supports Mac OS X 10.5, SDL
will too. :slight_smile:

There are no current plans to remove Mac OS X 10.5 support.

On Wed, Mar 19, 2014 at 11:58 PM, Jiang Jiang wrote:
On Thu, Mar 20, 2014 at 4:11 AM, Ryan C. Gordon wrote:

The big problem is that we’re using some of these APIs because we
still
support 10.5, so we would need to make sure we don’t lose those
systems.
It’s an awkward tapdance.

This is a good set of patches, but I’d need to keep 10.5
compatibility. I’m
not sure the right way to swing that here, yet.

Right, I didn’t realize that. I thought SDL 2.0 is for OS X 10.6 and
up.

Any plans for dropping 10.5 support in a version like 2.1? or is there
any criteria for keeping 10.5 support? According statistics like
http://update.omnigroup.com 10.5 users are fairly low these days.

  • Jiang

SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org