Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make sure that the code still compiles with the freaking paranoid gcc warning options...
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 5 Sep 2005 22:32:30 +0000 (22:32 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 5 Sep 2005 22:32:30 +0000 (22:32 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1687 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/amok/Bandwidth/bandwidth.c
src/gras/DataDesc/cbps.c
src/gras/DataDesc/ddt_create.c
src/gras/DataDesc/ddt_exchange.c
src/gras/Msg/msg.c
src/gras/Virtu/process.c
src/xbt/config.c
src/xbt/dict.c
src/xbt/log.c

index 4d23b5c..fc704c6 100644 (file)
@@ -126,7 +126,7 @@ void amok_bw_test(gras_socket_t peer,
          /*OUT*/ double *sec, double *bw) {
 
   /* Measurement sockets for the experiments */
-  gras_socket_t measMasterIn=NULL,measIn,measOut;
+  gras_socket_t measMasterIn=NULL,measIn,measOut=NULL;
   int port;
   bw_request_t request,request_ack;
   xbt_ex_t e;
@@ -212,7 +212,7 @@ void amok_bw_test(gras_socket_t peer,
 */
 int amok_bw_cb_bw_handshake(gras_socket_t  expeditor,
                            void          *payload) {
-  gras_socket_t measMasterIn=NULL,measIn,measOut;
+  gras_socket_t measMasterIn=NULL,measIn=NULL,measOut=NULL;
   bw_request_t request=*(bw_request_t*)payload;
   bw_request_t answer;
   xbt_ex_t e;
index e338b8e..69b3ed2 100644 (file)
@@ -72,7 +72,7 @@ gras_cbps_v_push(gras_cbps_t          ps,
                 void                *data,
                 gras_datadesc_type_t ddt) {
 
-  xbt_dynar_t     varstack,frame;
+  xbt_dynar_t     varstack=NULL,frame;
   gras_cbps_elm_t var;
   char           *varname = (char*)xbt_strdup(name);
   xbt_ex_t        e;
index cffe323..6caa963 100644 (file)
@@ -53,7 +53,7 @@ static gras_datadesc_type_t gras_ddt_new(const char *name) {
  */
 gras_datadesc_type_t gras_datadesc_by_name(const char *name) {
   xbt_ex_t e;
-  gras_datadesc_type_t res;
+  gras_datadesc_type_t res = NULL;
   TRY {
     res = (gras_datadesc_type_t)xbt_set_get_by_name(gras_datadesc_set_local,name);
   } CATCH(e) {
@@ -70,7 +70,7 @@ gras_datadesc_type_t gras_datadesc_by_name(const char *name) {
  */
 gras_datadesc_type_t gras_datadesc_by_id(long int code) {
   xbt_ex_t e;
-  gras_datadesc_type_t res;
+  gras_datadesc_type_t res=NULL;
   TRY {
     res = (gras_datadesc_type_t)xbt_set_get_by_id(gras_datadesc_set_local,code);
   } CATCH(e) {
index 2f3b44e..15c9a65 100644 (file)
@@ -359,7 +359,7 @@ int gras_datadesc_copy(gras_datadesc_type_t type,
   xbt_ex_t e;
   gras_cbps_t  state;
   xbt_dict_t  refs; /* all references already sent */
-  int size;
+  int size=0;
  
   xbt_assert0(type,"called with NULL type descriptor");
 
index 91c9937..ea783f1 100644 (file)
@@ -138,7 +138,7 @@ gras_msgtype_declare_v(const char           *name,
                       short int             version,
                       gras_datadesc_type_t  payload) {
  
-  gras_msgtype_t msgtype;
+  gras_msgtype_t msgtype=NULL;
   char *namev=make_namev(name,version);
   int found = 0;
   xbt_ex_t e;    
@@ -289,7 +289,7 @@ gras_msg_handle(double timeOut) {
   int             cpt;
 
   s_gras_msg_t    msg;
-  gras_socket_t   expeditor;
+  gras_socket_t   expeditor=NULL;
   void           *payload=NULL;
   int             payload_size;
   gras_msgtype_t  msgtype;
index d38324d..670269d 100644 (file)
@@ -71,7 +71,7 @@ void gras_userdata_set(void *ud) {
 
 void *gras_libdata_get(const char *name) {
   gras_procdata_t *pd=gras_procdata_get();
-  void *res;
+  void *res=NULL;
   xbt_ex_t e;
    
   TRY {
index e6a802e..a6c8f6e 100644 (file)
@@ -365,7 +365,7 @@ xbt_cfg_check(xbt_cfg_t cfg) {
 static xbt_cfgelm_t xbt_cfgelm_get(xbt_cfg_t  cfg,
                                   const char *name,
                                   e_xbt_cfgelm_type_t type){
-  xbt_cfgelm_t res;
+  xbt_cfgelm_t res=NULL;
   xbt_ex_t e;
 
   TRY {
@@ -432,7 +432,7 @@ xbt_cfg_set_vargs(xbt_cfg_t cfg, const char *name, va_list pa) {
   char *str;
   int i;
   double d;
-  e_xbt_cfgelm_type_t type;
+  e_xbt_cfgelm_type_t type=0; /* Set a dummy value to make gcc happy. It cannot get uninitialized */
 
   xbt_ex_t e;
   
@@ -508,7 +508,7 @@ xbt_cfg_set_parse(xbt_cfg_t cfg, const char *options) {
   double d;
   char *str;
 
-  xbt_cfgelm_t variable;
+  xbt_cfgelm_t variable=NULL;
   char *optionlist_cpy;
   char *option,  *name,*val;
 
@@ -942,7 +942,7 @@ void xbt_cfg_rm_at   (xbt_cfg_t cfg, const char *name, int pos) {
 
 void
 xbt_cfg_empty(xbt_cfg_t cfg,const char*name) {
-  xbt_cfgelm_t variable;
+  xbt_cfgelm_t variable=NULL;
   xbt_ex_t e;
 
   TRY {
@@ -1085,7 +1085,7 @@ void xbt_cfg_get_host  (xbt_cfg_t   cfg,  const char *name,
  * \warning the returned value is the actual content of the config set
  */
 xbt_dynar_t xbt_cfg_get_dynar (xbt_cfg_t    cfg, const char *name) {
-  xbt_cfgelm_t variable;
+  xbt_cfgelm_t variable=NULL;
   xbt_ex_t     e;
 
   TRY {
index 37bc175..87e4ae9 100644 (file)
@@ -140,7 +140,7 @@ void *
 xbt_dict_get_or_null(xbt_dict_t     dict,
                     const char     *key) {
   xbt_ex_t e;
-  void *res;
+  void *res=NULL;
   TRY {
     res = xbt_dictelm_get(dict->head, key);
   } CATCH(e) {
index 16ad6ab..c5d387a 100644 (file)
@@ -665,8 +665,8 @@ void xbt_log_control_set(const char* control_string) {
   _cleanup_double_spaces(cs);
 
   while (!done) {
-    xbt_log_category_t cat;
-    int found;
+    xbt_log_category_t cat=NULL;
+    int found=0;
     xbt_ex_t e;
     
     p=strrchr(cs,' ');