Bitcoin Forum
December 10, 2016, 10:26:12 PM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Bitcoin compilation - 1253 warnings  (Read 905 times)
melek
Newbie
*
Offline Offline

Activity: 11


View Profile
March 01, 2011, 12:19:49 AM
 #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?
1481408772
Hero Member
*
Offline Offline

Posts: 1481408772

View Profile Personal Message (Offline)

Ignore
1481408772
Reply with quote  #2

1481408772
Report to moderator
1481408772
Hero Member
*
Offline Offline

Posts: 1481408772

View Profile Personal Message (Offline)

Ignore
1481408772
Reply with quote  #2

1481408772
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481408772
Hero Member
*
Offline Offline

Posts: 1481408772

View Profile Personal Message (Offline)

Ignore
1481408772
Reply with quote  #2

1481408772
Report to moderator
1481408772
Hero Member
*
Offline Offline

Posts: 1481408772

View Profile Personal Message (Offline)

Ignore
1481408772
Reply with quote  #2

1481408772
Report to moderator
1481408772
Hero Member
*
Offline Offline

Posts: 1481408772

View Profile Personal Message (Offline)

Ignore
1481408772
Reply with quote  #2

1481408772
Report to moderator
melek
Newbie
*
Offline Offline

Activity: 11


View Profile
March 01, 2011, 12:21:22 AM
 #2

Oops, I think this should be moved to the developer section. I posted here by mistake.
error
Hero Member
*****
Offline Offline

Activity: 574



View Profile
March 03, 2011, 05: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.

15UFyv6kfWgq83Pp3yhXPr8rknv9m6581W
jgarzik
Legendary
*
qt
Offline Offline

Activity: 1470


View Profile
March 03, 2011, 06: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.


Jeff Garzik, bitcoin core dev team and BitPay engineer; opinions are my own, not my employer.
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!