Просмотр исходного кода

defect 505 - fix uncompilable with gcc 2.95

(Logical change 1.186)


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@619 fd59a12c-fef9-0310-b244-a6a79926bd2f
Steven Dake 21 лет назад
Родитель
Сommit
3d8dbf1d32
4 измененных файлов с 11 добавлено и 7 удалено
  1. 3 2
      exec/amf.c
  2. 4 2
      exec/ckpt.c
  3. 1 1
      exec/evt.c
  4. 3 2
      test/ckpt-wr.c

+ 3 - 2
exec/amf.c

@@ -1426,9 +1426,10 @@ void error_report (
 int healthcheck_instance = 0;
 
 void timer_function_libamf_healthcheck (void *data) {
-	struct res_lib_amf_healthcheckcallback res_lib_amf_healthcheckcallback;
-	memset (&res_lib_amf_healthcheckcallback,0,sizeof(res_lib_amf_healthcheckcallback));
 	struct conn_info *conn_info = (struct conn_info *)data;
+	struct res_lib_amf_healthcheckcallback res_lib_amf_healthcheckcallback;
+
+	memset (&res_lib_amf_healthcheckcallback, 0, sizeof(res_lib_amf_healthcheckcallback));
 
 	res_lib_amf_healthcheckcallback.header.id = MESSAGE_RES_AMF_HEALTHCHECKCALLBACK;
 	res_lib_amf_healthcheckcallback.header.size = sizeof (struct res_lib_amf_healthcheckcallback);

+ 4 - 2
exec/ckpt.c

@@ -1014,6 +1014,7 @@ static int message_handler_req_exec_ckpt_checkpointopen (void *message, struct i
 	struct saCkptCheckpointSection *ckptCheckpointSection = 0;
 	struct checkpoint_cleanup *checkpoint_cleanup;
 	SaErrorT error = SA_AIS_OK;
+	int proc_index;
 
 	log_printf (LOG_LEVEL_DEBUG, "Executive request to open checkpoint %p\n", req_exec_ckpt_checkpointopen);
 	
@@ -1092,7 +1093,7 @@ static int message_handler_req_exec_ckpt_checkpointopen (void *message, struct i
 	 * 
 	 */
 	 
-	 int proc_index = processor_index_find(&source_addr,ckptCheckpoint->ckpt_refcount);
+	 proc_index = processor_index_find(&source_addr,ckptCheckpoint->ckpt_refcount);
 	 if (proc_index == -1) {/* Could not find, lets set the processor to an index.*/
 	 	proc_index = processor_index_set(&source_addr,ckptCheckpoint->ckpt_refcount);
 	 }
@@ -1357,6 +1358,7 @@ extern int message_handler_req_exec_ckpt_checkpointclose (void *message, struct
 	struct res_lib_ckpt_checkpointclose res_lib_ckpt_checkpointclose;
 	struct saCkptCheckpoint *checkpoint = 0;
 	SaAisErrorT error = SA_AIS_OK;
+	int proc_index;
 
 	log_printf (LOG_LEVEL_DEBUG, "Got EXEC request to close checkpoint %s\n", getSaNameT (&req_exec_ckpt_checkpointclose->checkpointName));
 
@@ -1372,7 +1374,7 @@ extern int message_handler_req_exec_ckpt_checkpointclose (void *message, struct
 	 * sent out later as a part of the sync process.	 
 	 */
 	
-	int proc_index = processor_index_find(&source_addr, checkpoint->ckpt_refcount);
+	proc_index = processor_index_find(&source_addr, checkpoint->ckpt_refcount);
 	if (proc_index != -1 ) {	 		
 	 	checkpoint->ckpt_refcount[proc_index].count--;
 	}

+ 1 - 1
exec/evt.c

@@ -3845,12 +3845,12 @@ static int evt_sync_process(void)
 	 */
 	case evt_send_open_count:
 	{
-		log_printf(RECOVERY_DEBUG, "Send open count updates\n");
 		struct req_evt_chan_command cpkt;
 		struct iovec chn_iovec;
 		struct event_svr_channel_instance *eci;
 		int res;
 
+		log_printf(RECOVERY_DEBUG, "Send open count updates\n");
 		/*
 		 * Process messages.  When we're done, send the done message
 		 * to the nodes.

+ 3 - 2
test/ckpt-wr.c

@@ -109,12 +109,13 @@ int main (void) {
 	char data[MAX_DATA_SIZE];
 	struct timespec delay;
 	struct timespec delay2;
-	delay.tv_sec = 1;
-	delay.tv_nsec = 0;
 	SaCkptIOVectorElementT writeElement;
 	long count = 0;
 	SaUint32T erroroneousVectorIndex = 0;
 
+	delay.tv_sec = 1;
+	delay.tv_nsec = 0;
+
 	error = saCkptInitialize (&ckptHandle, &callbacks, &version);
 
 	error = saCkptCheckpointOpen (ckptHandle,