Fix some LLVM Clang compilation warnings (#2)BRL-CAD
Status: ClosedTime to complete: 48 hrs Mentors: SeanTags: compile, llvm, clang

This is a follow-on task to a previous attempt to build BRL-CAD with the LLVM compiler:

http://www.google-melange.com/gci/task/view/google/gci2012/8023206

That task encountered a number of warnings and we like to fix our warnings as a matter of code quality, standards conformance, and portability.  Looking at the log, most are pretty easy warnings to address but care must be taken to quell the warnings without suppressing the false positives in a bad way.

Your task is to fix some of the warnings, at least 20 of them.  Keep track of how long you work on them and we may create additional tasks accordingly for your efforts.  You'll submit your work as a single patch file.  See http://brlcad.org/wiki/Compiling for help.

Note that the %V format specifier is valid to our functions and the 'inline' keyword is intentinoal.  Both need to be handled at the cmake build sysstem level, not by removing them from code or changing them.  If you don't know what that means, ignore those warnings.

Submit a log of the warning messages that you fixed (since they'll obviously not be there if your patch is appiled).  Copy-paste them and the preceding compile line verbatim from a "make VERBOSE=1" compilation.

As there are multiple warning-fix tasks, make sure you're compiling with up-to-date sources and are able to compile successfully before claiming this task.

Uploaded Work
File name/URLFile sizeDate submitted
clang-fix.tar.gz3.1 KBJanuary 06 2013 07:36 UTC
Comments
Skriptkidon January 5 2013 18:00 UTCTask Claimed

I would like to work on this task.

Harmanpreet Singh on January 5 2013 18:02 UTCTask Assigned

This task has been assigned to Skriptkid. You have 48 hours to complete this task, good luck!

Skriptkidon January 6 2013 07:36 UTCReady for review

The work on this task is ready to be reviewed.

Sean on January 6 2013 15:11 UTCwindows?

Do you happen to have a Windows compilation environment (MSVC) available to test whether your changes are compatible?


 

Skriptkidon January 6 2013 15:42 UTCAs of now, no

But I'll install MSVC and test it.

Sean on January 6 2013 16:19 UTCgood news

The good news is that all of those printing calls seem to be going through our bu_*() interface for printing so we control the print specifiers.  I suspect the issue will be with MSVC6 and MINGW compilation where Windows compilation needs %I64x instead of %llx but that could all be handled within our bu_ function.


 

Sean on January 6 2013 16:19 UTCTask Closed

Congratulations, this task has been completed successfully.

Skriptkidon January 6 2013 16:58 UTCSo

Shall I test it on MSVC also? Or is it not necessary now?

Sean on January 8 2013 08:15 UTCthat would be great

It would be great to know whether it works or not, a quick compile test.