Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Cross-Platform Development => Topic started by: Zacam on January 09, 2010, 06:08:53 pm

Title: Warnings Resolution Data Aquisition Request
Post by: Zacam on January 09, 2010, 06:08:53 pm
Mantis Issue 2036 (http://scp.indiegames.us/mantis/view.php?id=2036) may say "Visual Studios" but I am actually aiming at cross-platform warnings resolution.

To that end, I would like output logs on successful Debug Builds from the various projects so that I can implement the fixes.

It would also be extremely helpful if I could then get a second output log after the implementation of this patch: 5792-Warnings.patch (http://zacam.ueuo.com/scp/Patches/5792-Warnings.patch)

This way, I can compare the outputs and just focus on what is left. This will also make the deployment into Trunk a lot smoother when it takes place and will let me know if there is anything in the current .patch that I need to revise in terms of other platforms.

Thank you in advance and in general for your assistance.

We can use this topic to maintain the conversation regarding the matter, rather than as an aside or after on other topics.
Title: Re: Warnings Resolution Data Aquisition Request
Post by: Echelon9 on January 10, 2010, 12:53:07 am
Attached are the two compiler & linker logs, both on Xcode 3.2.1 / GCC 4.0 / OS X 10.6.2 in the default Debug configuration:
(1) r5802, and
(2) r5802 with the  5792-Warnings.patch (http://zacam.ueuo.com/scp/Patches/5792-Warnings.patch)

The broad classification of the Warnings, and an example of each are:

 Comparison is always true due to limited range of data type
   - 5792-Warnings patch adds one to playermenu.cpp:602

 Comparison is always false due to limited range of data type
   - 5792-Warnings patch adds to playermenu.cpp:1418, acm-openal.cpp:179, acm-openal.cpp:181

 Incompatible implicit declaration of built-in function 'exit'
   - contained in the external JPEG lib, so not a priority for us to change it.

 Invalid access to non-static data member 'hud_info::Player_shield_coords' of NULL object, (perhaps the 'offsetof' macro was used incorrectly)
   - there are a great many of these

 SWAPFLOAT(float*) has different visibility (default) in ..../libcode.a(multi_respawn.o) and (hidden) in .../multi_sexp.o
   - there are a great many of these, some research indicates further details here (http://lists.apple.com/archives/Xcode-users/2008/Mar/msg00657.html) and here (http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/CppRuntimeEnv/Articles/SymbolVisibility.html).

The 5792-Warnings.patch does add a few more warnings, AFAIK just in relation to 'Comparison is always [true|false] due to limited range of data type' warnings. Note that warnings will be repeated due to a PPC and Intel x86 separate build in the same compile.

[attachment deleted by admin]
Title: Re: Warnings Resolution Data Aquisition Request
Post by: Zacam on January 15, 2010, 01:40:02 pm
Thanks! Sadly, wading through it all caused a migraine headache, but I'm better now, I think. :-)

I'll incorporate what I see here as I move forward. I'll disable some error suppression on the MSVC side to get it to line up a bit better and start an more in-depth tackling on it.

And I see what you mean on the added "limited range", probably comes from casting conversions from what little I can recall right at this moment.