Correct Monte Carlo compiler error on CentOS 7

Also change the Cannon sim monte_post jobs to use mc_read/write instead
of tc_read/write

Refs #396
This commit is contained in:
Derek Bankieris 2017-03-24 08:11:32 -05:00
parent 80ab0767e2
commit 2335f6bb69
3 changed files with 4 additions and 3 deletions

View File

@ -20,7 +20,7 @@ int cannon_post_master(
(void)C ;
/* Read slave's results */
tc_read( mc_get_connection_device(),(char*) &C_curr, sizeof(CANNON_AERO) );
mc_read( (char*) &C_curr, sizeof(CANNON_AERO) );
fprintf(stderr, "%03d> F(", mc_get_current_run());
amoeba_print_point(4, A->curr_point) ;

View File

@ -13,6 +13,6 @@ int cannon_post_slave(
{
/* Send slave results */
tc_write( mc_get_connection_device(), (char*) C, sizeof(CANNON_AERO) );
mc_write( (char*) C, sizeof(CANNON_AERO) );
return(0) ;
}

View File

@ -55,7 +55,8 @@ void Trick::MonteCarlo::handle_initialization(Trick::MonteSlave& slave) {
}
size = ntohl(size);
char name[size + 1] = {};
char name[size + 1];
name[size] = '\0';
if (tc_read(&connection_device, name, size) != size) {
set_disconnected_state(slave);
return;