Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Return type for main() should be int!
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Mon, 27 Jun 2011 13:56:56 +0000 (15:56 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Mon, 27 Jun 2011 14:20:15 +0000 (16:20 +0200)
This is 3.6.2 material. ;-)

buildtools/Cmake/test_prog/prog_mutex_timedlock.c
buildtools/Cmake/test_prog/prog_sem_init.c

index 1b0664a..8c394ed 100644 (file)
@@ -6,9 +6,10 @@
 
 #include <pthread.h>
 
 
 #include <pthread.h>
 
-void main(void)
+int main(void)
 {
   pthread_mutex_t s;
   const struct timespec t;
   sem_timedlock(&s, &t);
 {
   pthread_mutex_t s;
   const struct timespec t;
   sem_timedlock(&s, &t);
+  return 0;
 }
 }
index 9027c47..5302a80 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <semaphore.h>
 
 
 #include <semaphore.h>
 
-void main(void)
+int main(void)
 {
   sem_t s;
   if (sem_init(&s, 0, 0) != 0) 
 {
   sem_t s;
   if (sem_init(&s, 0, 0) != 0)