[Spread-users] Compiling Spread 3.17.2 under Win32

Bob Baggerman bob.baggerman at gtri.gatech.edu
Wed May 26 12:56:13 EDT 2004


Greetings Spread list!

I'm new to Spread and am interested in using it both on Linux and 
Win32.  Spread builds cleanly with gcc, but MS Visual C++ 6 complains 
about one programming idium in particular.

When building the Spread library, the files 'membership.c', 'network.c', 
and 'protocol.c' add an event to the event queue using the E_queue() 
call.  The first parameter of the E_queue() call is defined as a pointer 
to a handler function that takes two parameters.  However in these 
source files, E_queue() is being provided a pointer to a handler 
function that has no arguements.  Gcc is happy with this, but MSVC 
throws a C4113 warning. 

On the one hand it doesn't seem unreasonable for the MSVC compiler to 
complain about a passed parameter that doesn't match what it was told to 
expect.  On the other hand, maybe there's no harm in making a function 
call and pushing passed parameters onto a stack that the called 
procedure doesn't know are there and can't access.  Gcc doesn't complain 
(even with -pedantic) so I suspect in the end it's OK, but it does seem 
sort of like sloppy coding in otherwise nicely done (but under 
commented) code.

Any thoughts?

Bob Baggerman

-- 
Bob Baggerman                    ! bob.baggerman at gtri.gatech.edu
Electronic Systems Laboratory    ! 404-894-7109 (office)
Georgia Tech Research Institute  ! 404-894-7080 (FAX)
Atlanta, GA  30332  USA          !






More information about the Spread-users mailing list