[mpich2-commits] r6714 - mpich2/trunk/src/mpi/errhan

jayesh at mcs.anl.gov jayesh at mcs.anl.gov
Mon May 24 13:29:06 CDT 2010


Author: jayesh
Date: 2010-05-24 13:29:06 -0500 (Mon, 24 May 2010)
New Revision: 6714

Modified:
   mpich2/trunk/src/mpi/errhan/errutil.c
Log:
Make sure that all vars are declared at the beginning of a code block - ansi c restriction

Modified: mpich2/trunk/src/mpi/errhan/errutil.c
===================================================================
--- mpich2/trunk/src/mpi/errhan/errutil.c	2010-05-24 18:25:52 UTC (rev 6713)
+++ mpich2/trunk/src/mpi/errhan/errutil.c	2010-05-24 18:29:06 UTC (rev 6714)
@@ -1772,15 +1772,17 @@
     if (MPIR_PARAM_CHOP_ERROR_STACK < 0) {
         MPIR_PARAM_CHOP_ERROR_STACK = 80;
 #ifdef HAVE_WINDOWS_H
-        /* If windows, set the default width to the window size */
-        HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
-        if (hConsole != INVALID_HANDLE_VALUE)
         {
-            CONSOLE_SCREEN_BUFFER_INFO info;
-            if (GetConsoleScreenBufferInfo(hConsole, &info))
+            /* If windows, set the default width to the window size */
+            HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
+            if (hConsole != INVALID_HANDLE_VALUE)
             {
-                /* override the parameter system in this case */
-                MPIR_PARAM_CHOP_ERROR_STACK = info.dwMaximumWindowSize.X;
+                CONSOLE_SCREEN_BUFFER_INFO info;
+                if (GetConsoleScreenBufferInfo(hConsole, &info))
+                {
+                    /* override the parameter system in this case */
+                    MPIR_PARAM_CHOP_ERROR_STACK = info.dwMaximumWindowSize.X;
+                }
             }
         }
 #endif



More information about the mpich2-commits mailing list