Bitcoin Forum
May 06, 2024, 12:28:00 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin compilation - 1253 warnings  (Read 1145 times)
melek (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 0


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?
1714998480
Hero Member
*
Offline Offline

Posts: 1714998480

View Profile Personal Message (Offline)

Ignore
1714998480
Reply with quote  #2

1714998480
Report to moderator
Whoever mines the block which ends up containing your transaction will get its fee.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714998480
Hero Member
*
Offline Offline

Posts: 1714998480

View Profile Personal Message (Offline)

Ignore
1714998480
Reply with quote  #2

1714998480
Report to moderator
1714998480
Hero Member
*
Offline Offline

Posts: 1714998480

View Profile Personal Message (Offline)

Ignore
1714998480
Reply with quote  #2

1714998480
Report to moderator
1714998480
Hero Member
*
Offline Offline

Posts: 1714998480

View Profile Personal Message (Offline)

Ignore
1714998480
Reply with quote  #2

1714998480
Report to moderator
melek (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 0


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: 588
Merit: 500



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.

3KzNGwzRZ6SimWuFAgh4TnXzHpruHMZmV8
jgarzik
Legendary
*
qt
Offline Offline

Activity: 1596
Merit: 1091


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, Bloq CEO, former bitcoin core dev team; opinions are my own.
Visit bloq.com / metronome.io
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!