pioneerspacesim/pioneer — pull request #1451 by johnbartholomew (2012-08-22 09:59:44+00:00)
Title: Switch to a different COUNTOF macro to avoid strict-aliasing warnings

Fixes #1450.

Previous COUNTOF macro produces strict aliasing warnings because it does some pointer casting. Those warnings are erroneous, because that pointer casting happens inside sizeof() where nothing will be dereferenced.

This version has the advantage of looking a bit simpler and not producing warnings. It won't work for types defined inside functions, but we probably won't need that.