From fa8d976f6621d2806f43b6bede3f15c1e3efad6e Mon Sep 17 00:00:00 2001
From: Francois Henrotte <francois.henrotte@ulg.ac.be>
Date: Wed, 28 Nov 2012 22:12:24 +0000
Subject: [PATCH] moved declaration of srgc and srgv

---
 Common/GmshMessage.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Common/GmshMessage.cpp b/Common/GmshMessage.cpp
index ef5dabf5f2..f9b256a32c 100644
--- a/Common/GmshMessage.cpp
+++ b/Common/GmshMessage.cpp
@@ -77,6 +77,8 @@ static int vsnprintf(char *str, size_t size, const char *fmt, va_list ap)
 
 void Msg::Init(int argc, char **argv)
 {
+  int sargc = 0;
+  char **sargv = new char*[argc];
 #if defined(HAVE_MPI)
   int flag;
   MPI_Initialized(&flag);
@@ -87,8 +89,6 @@ void Msg::Init(int argc, char **argv)
 #endif
 #if defined(HAVE_PETSC)
   // prune argv from stuff that confuses PETSc
-  int sargc = 0;
-  char **sargv = new char*[argc];
   for(int i = 0; i < argc; i++){
     std::string val(argv[i]);
     if(val != "-info" && val != "-help" && val != "-v")
-- 
GitLab