Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Mark as volatile variables that "might be clobbered by ‘longjmp’ or ‘vfork’".
[simgrid.git] / src / gras / Transport / transport.c
index 79cc64a..1c86966 100644 (file)
@@ -9,7 +9,9 @@
 /***
  *** Options
  ***/
+#ifndef NDEBUG
 static int gras_opt_trp_nomoredata_on_close = 0;
+#endif
 
 #include "xbt/ex.h"
 #include "xbt/peer.h"
@@ -83,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;
 
@@ -188,7 +189,7 @@ void gras_socket_close(xbt_socket_t sock)
   xbt_socket_t sock_iter = NULL;
   unsigned int cursor;
 
-  XBT_IN("");
+  XBT_IN();
   XBT_VERB("Close %p", sock);
   if (sock == _gras_lastly_selected_socket) {
     xbt_assert(!gras_opt_trp_nomoredata_on_close || !sock->moredata,