Author

Topic: Bitcoin compilation - 1253 warnings (Read 1170 times)

legendary
Activity: 1596
Merit: 1100
March 03, 2011, 01:07:02 PM
#4
Most of the warnings are repetitive, and seem to be related to the use of the macro IMPLEMENT_SERIALIZE. There are also warnings about variables that are defined but never used. Is anybody looking in cleaning up these warning messages?

We don't get these warnings when building with gcc and other compilers.

hero member
Activity: 588
Merit: 500
March 03, 2011, 12:50:48 PM
#3
Macros are evil. They should not normally be used in C++ code. That said, I haven't yet looked at this particular macro to see if it actually should be a macro, but smart bitcoins will bet that it should not be.
newbie
Activity: 11
Merit: 0
February 28, 2011, 07:21:22 PM
#2
Oops, I think this should be moved to the developer section. I posted here by mistake.
newbie
Activity: 11
Merit: 0
February 28, 2011, 07:19:49 PM
#1
Compiling bitcoind in XCode results in a lot of warning messages:

http://img543.imageshack.us/img543/6062/screenshot20110228at416.png

http://img46.imageshack.us/img46/9896/screenshot20110228at410.png

Most of the warnings are repetitive, and seem to be related to the use of the macro IMPLEMENT_SERIALIZE. There are also warnings about variables that are defined but never used. Is anybody looking in cleaning up these warning messages?

Also, the bitcoin code seems to rely excessively on the use of macros, rather than using actual functions. I am not completely familiar with the details of why these macros are used, but isn't it considering bad coding style to actually rely on macros from the perspective of clarity and maintainability?
Jump to: