Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Address compilation warnings.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 12 Jun 2013 09:42:08 +0000 (11:42 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 12 Jun 2013 09:45:31 +0000 (11:45 +0200)
examples/msg/semaphores/synchro.c

index b63a759..b66b1d3 100644 (file)
@@ -8,7 +8,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_semaphore_example,
 
 msg_sem_t sem;
 
-int peer(int argc, char* argv[]){
+static int peer(int argc, char* argv[]){
 
   int i = 0; 
   
@@ -27,6 +27,8 @@ int peer(int argc, char* argv[]){
   }
   MSG_process_sleep(50);
   XBT_INFO("Done");
+
+  return 0;
 }
 
 int main(int argc, char* argv[]) {
@@ -70,5 +72,5 @@ int main(int argc, char* argv[]) {
 
   msg_error_t res = MSG_main();
   printf("Finished\n");
-  return 0;
+  return (res != MSG_OK);
 }