Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Mark as volatile variables that "might be clobbered by ‘longjmp’ or ‘vfork’".
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 2 Oct 2012 09:30:46 +0000 (11:30 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 2 Oct 2012 12:41:55 +0000 (14:41 +0200)
src/amok/Bandwidth/bandwidth.c
src/gras/Transport/transport.c

index d5fb441..05ebc4e 100644 (file)
@@ -293,8 +293,8 @@ int amok_bw_cb_bw_handshake(gras_msg_cb_ctx_t ctx, void *payload)
   volatile bw_request_t request = *(bw_request_t *) payload;
   bw_request_t answer;
   xbt_ex_t e;
-  int port;
-  int tooshort = 1;
+  volatile int port;
+  volatile int tooshort = 1;
   gras_msg_cb_ctx_t ctx_reask;
   static xbt_dynar_t msgtwaited = NULL;
 
index ce6a7e5..1c86966 100644 (file)
@@ -85,8 +85,7 @@ xbt_socket_t
 gras_socket_server_range(unsigned short minport, unsigned short maxport,
                          unsigned long int buf_size, int measurement)
 {
-
-  int port;
+  volatile int port;
   xbt_socket_t res = NULL;
   xbt_ex_t e;