Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cleared warn: init discards pointer...
authorquasar <quasar@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 5 Nov 2007 10:49:00 +0000 (10:49 +0000)
committerquasar <quasar@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 5 Nov 2007 10:49:00 +0000 (10:49 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4966 48e7efb5-ca39-0410-a469-dd3cf9ba447f

examples/gras/properties/gras_prop.c
examples/msg/properties/msg_prop.c
examples/simdag/properties/sd_prop.c

index fa74db4..6ad2d41 100644 (file)
@@ -19,7 +19,7 @@ int client(int argc, char *argv[]) {
   }
  
   /* Try to get a property that does not exist */
-  char *noexist="Nonexisent";
+  char noexist[]="Nonexisent";
   const char *value = gras_process_property_value(noexist);
   if ( value == NULL) 
     INFO1("Process property: %s is undefined", noexist);
@@ -28,7 +28,7 @@ int client(int argc, char *argv[]) {
  
    /* Modify an existing property. First check it exists */\
     INFO0("Trying to modify a process property");
-    char *exist="otherprop";
+    char exist[]="otherprop";
     value = gras_process_property_value(exist);
     if ( value == NULL) 
       INFO1("\tProperty: %s is undefined", exist);
@@ -62,7 +62,7 @@ int server(int argc, char *argv[]) {
   }
  
   /* Try to get a property that does not exist */
-  char *noexist="Nonexisent";
+  char noexist[]="Nonexisent";
   const char *value = gras_os_host_property_value(noexist);
   if ( value == NULL) 
     INFO1("Host property: %s is undefined", noexist);
index 960aced..8547755 100644 (file)
@@ -79,16 +79,16 @@ int master(int argc, char *argv[])
       }
 
      /* Try to get a property that does not exist */
-     char *noexist="Unknown";
-     const char*value = MSG_host_get_property_value(slaves[i-4],noexist);
+     char noexist[]="Unknown";
+     const char*value = MSG_host_get_property_value(slaves[i-4], noexist);
      if ( value == NULL) 
        INFO2("Property: %s for host %s is undefined", noexist, argv[i]);
      else
-       INFO3("Property: %s for host %s has value: %s", noexist, argv[i], value);
+       INFO3("Property: %s for host %s has value: %s",(char*) noexist, argv[i], value);
 
       /* Modify an existing property test. First check it exists */\
       INFO0("Trying to modify a host property");
-      char *exist="Hdd";
+      char exist[]="Hdd";
       value = MSG_host_get_property_value(slaves[i-4],exist);
       if ( value == NULL) 
         INFO1("\tProperty: %s is undefined", exist);
@@ -147,7 +147,7 @@ int slave(int argc, char *argv[])
       }
 
       /* Try to get a property that does not exist */
-      char *noexist="UnknownProcessProp";
+      char noexist[]="UnknownProcessProp";
       const char *value = MSG_process_get_property_value(MSG_process_self(),noexist);
       if ( value == NULL) 
         INFO2("Property: %s for process %s is undefined", noexist, MSG_process_get_name(MSG_process_self()));
index 5816cbf..131d9f0 100755 (executable)
@@ -54,7 +54,7 @@ int main(int argc, char **argv) {
   }
  
   /* Try to get a property that does not exist */
-  char *noexist="NoProp";
+  char noexist[]="NoProp";
   const char *value = SD_workstation_get_property_value(w1,noexist);
   if ( value == NULL) 
     INFO1("\tProperty: %s is undefined", noexist);
@@ -74,7 +74,7 @@ int main(int argc, char **argv) {
 
   /* Modify an existing property test. First check it exists */\
   INFO0("Modify an host existing property");
-  char *exist="Hdd";
+  char exist[]="Hdd";
   value = SD_workstation_get_property_value(w2,exist);
   if ( value == NULL) 
     INFO1("\tProperty: %s is undefined", exist);