Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines.
[simgrid.git] / tools / cmake / test_prog / prog_stacksetup.c
index 5664e1b..75ccc6b 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2014-2018. The SimGrid Team. All rights reserved.    */
+/* Copyright (c) 2010-2021. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -26,7 +26,8 @@ void handler(void)
 {
   char garbage[1024];
   auto int dummy;
-  for (int i = 0; i < 1024; i++)
+  int i;
+  for (i = 0; i < 1024; i++)
     garbage[i] = 'X';
   handler_addr = (char *) &dummy;
   swapcontext(&uc_handler, &uc_main);
@@ -39,7 +40,8 @@ int main(int argc, char *argv[])
   char *skbuf = (char *) malloc(sksize * 2 + 2 * sizeof(union alltypes));
   if (skbuf == NULL)
     exit(1);
-  for (int i = 0; i < sksize * 2 + 2 * sizeof(union alltypes); i++)
+  int i;
+  for (i = 0; i < sksize * 2 + 2 * sizeof(union alltypes); i++)
     skbuf[i] = 'A';
   char *skaddr = skbuf + sizeof(union alltypes);