]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
merge from V4_1_0_maintainance branch (from tag mergeto_BR_QT4_Dev2_29Jul08)
authorvsr <vsr@opencascade.com>
Tue, 29 Jul 2008 10:04:14 +0000 (10:04 +0000)
committervsr <vsr@opencascade.com>
Tue, 29 Jul 2008 10:04:14 +0000 (10:04 +0000)
69 files changed:
Makefile.am
bin/killSalome.py
bin/nameserver.py
bin/runNS.py
idl/Makefile.am
salome_adm/unix/Makefile.am
salome_adm/unix/SALOMEconfig.ref.in
salome_adm/unix/config_files/check_cas.m4
src/Batch/Batch_Date.cxx
src/Batch/Batch_Versatile.cxx
src/Communication_SWIG/libSALOME_Comm.i
src/Container/Container_i.cxx
src/Container/Container_init_python.hxx
src/Container/SALOME_Container.cxx
src/Container/SALOME_Container_SignalsHandler.cxx
src/Container/SALOME_FileRef_i.cxx
src/Container/Salome_file_i.cxx
src/DF/testDF.cxx
src/DSC/DSC_Python/calcium.i
src/DSC/DSC_User/Datastream/Calcium/CalciumCxxInterface.hxx
src/DSC/DSC_User/Datastream/Calcium/Makefile.am
src/DSC/DSC_User/Datastream/Palm/test_DataIdContainer.cxx
src/DSC/DSC_User/Datastream/fake.cc
src/HDFPersist/HDFfile.cc
src/HDFPersist/HDFfile.hxx
src/HDFPersist/HDFgroup.cc
src/HDFPersist/HDFgroup.hxx
src/HDFPersist/HDFnObjects.c
src/HDFPersist/HDFobjectIdentify.c
src/HDFPersist/hdfi.h
src/Launcher/Launcher.cxx
src/Launcher/Makefile.am
src/LifeCycleCORBA/SALOME_FileTransferCORBA.cxx
src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx
src/LifeCycleCORBA/Test/LifeCycleCORBATest.cxx
src/Logger/SALOME_Trace.hxx
src/NamingService/SALOME_NamingService.cxx
src/NamingService/Test/NamingServiceTest.cxx
src/Registry/RegistryService.cxx
src/ResourcesManager/ResourcesManager.cxx
src/SALOMEDS/SALOMEDS.cxx
src/SALOMEDS/SALOMEDS_AttributeUserID.cxx
src/SALOMEDS/SALOMEDS_GenericAttribute.cxx
src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx
src/SALOMEDS/SALOMEDS_SObject.cxx
src/SALOMEDS/SALOMEDS_SObject_i.cxx
src/SALOMEDS/SALOMEDS_Study.cxx
src/SALOMEDS/SALOMEDS_StudyManager.cxx
src/SALOMEDS/SALOMEDS_StudyManager_i.cxx
src/SALOMEDS/SALOMEDS_StudyManager_i.hxx
src/SALOMEDS/SALOMEDS_Study_i.cxx
src/SALOMEDS/Test/SALOMEDSTest.cxx
src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.cxx
src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.cxx
src/SALOMELocalTrace/FileTraceCollector.cxx
src/SALOMELocalTrace/LocalTraceBufferPool.cxx
src/SALOMELocalTrace/LocalTraceCollector.cxx
src/SALOMELocalTrace/Test/SALOMELocalTraceTest.cxx
src/SALOMETraceCollector/SALOMETraceCollector.cxx
src/SALOMETraceCollector/Test/SALOMETraceCollectorTest.cxx
src/SALOMETraceCollector/TraceCollector_WaitForServerReadiness.cxx
src/SALOMETraceCollector/TraceCollector_WaitForServerReadiness.hxx
src/TestContainer/SALOME_TestComponent_i.cxx
src/TestContainer/TestContainer.cxx
src/Utils/Test/UtilsTest.cxx
src/Utils/Utils_DESTRUCTEUR_GENERIQUE.cxx
src/Utils/Utils_Identity.cxx
src/Utils/Utils_SALOME_Exception.hxx
src/Utils/Utils_Timer.cxx

index 63730a5e5d6c1fa403bc61387c13798b0a6a5bef..54cd716fe6b5be3a4f1d0814943bb0fea5de59cd 100644 (file)
@@ -30,9 +30,9 @@ endif
 
 ACLOCAL_AMFLAGS = -I salome_adm/unix/config_files
 
-SUBDIRS = $(IDLDIR) salome_adm src doc bin resources
+SUBDIRS = salome_adm $(IDLDIR) src doc bin resources
 
-DIST_SUBDIRS=   idl salome_adm src doc bin resources
+DIST_SUBDIRS= salome_adm idl src doc bin resources
 
 DISTCLEANFILES = a.out
 
index 722fd31c72c92d803a025f8900e666a9011770e8..ed9164cf5388bf3202d2fe5e40ff27fda4915927 100755 (executable)
@@ -33,26 +33,24 @@ def killAllPorts():
     dirpidict = os.path.dirname(fpidict)
     fpidict   = os.path.basename(fpidict)
     fnamere   = re.compile("^%s$" % fpidict)
-    try:
-        for f in os.listdir(dirpidict):
-            mo = fnamere.match(f)
-            if mo: killMyPort(mo.group(1))
-            pass
-        pass
-    except:
+    for f in os.listdir(dirpidict):
+        mo = fnamere.match(f)
+       try:
+            killMyPort(mo.group(1))
+        except:
+           pass
         pass
     # provide compatibility with old-style pidict file (not dot-prefixed)
     fpidict   = getPiDict('(\d*)',hidden=False)
     dirpidict = os.path.dirname(fpidict)
     fpidict   = os.path.basename(fpidict)
     fnamere   = re.compile("^%s$" % fpidict)
-    try:
-        for f in os.listdir(dirpidict):
-            mo = fnamere.match(f)
-            if mo: killMyPort(mo.group(1))
-            pass
-        pass
-    except:
+    for f in os.listdir(dirpidict):
+        mo = fnamere.match(f)
+        try:
+            killMyPort(mo.group(1))
+       except:
+           pass
         pass    
     # kill other processes
     if sys.platform != 'win32':
index 8c039b1c520d5aa61b9c3b2b55e5cf3a5f1ea09e..99ec4c3b2f06d19a401fe0ea15d7d2875b00cee4 100755 (executable)
@@ -46,7 +46,7 @@ class NamingServer(Server):
         #os.system("touch " + upath + "/dummy")
         for fname in os.listdir(upath):
           try:
-            os.remove(upath + "/" + fname)
+            if not fname.startswith("."): os.remove(upath + "/" + fname)
           except:
             pass
         #os.system("rm -f " + upath + "/omninames* " + upath + "/dummy " + upath + "/*.log")
index 44476036965a6c885b9f56b0eb61bc4399b908dc..601c7b00d3dabb7ef1474d4a65981f0c9e90db2e 100755 (executable)
@@ -39,7 +39,7 @@ def startOmni():
   #os.system("touch " + upath + "/dummy")
   for fname in os.listdir(upath):
     try:
-      os.remove(upath + "/" + fname)
+      if not fname.startswith("."): os.remove(upath + "/" + fname)
     except:
       pass
   #os.system("rm -f " + upath + "/omninames* " + upath + "/dummy " + upath + "/*.log")
index 9ff37591de2d54238c88674176d55976943841c5..05bad51407f921ff97df54b1c542e4465d45ee08 100644 (file)
@@ -201,14 +201,15 @@ DSC_EnginesPaCO.h DSC_EnginesPaCO.cc : DSC_Engines.idl DSC_Engines.xml
 lib_LTLIBRARIES = libSalomeIDLKernel.la $(PAR_LIB)
 
 nodist_libSalomeIDLKernel_la_SOURCES = $(IDL_SOURCES) $(DYNIDL_SRCS)
-libSalomeIDLKernel_la_CPPFLAGS =-I$(top_builddir)/salome_adm/unix \
+libSalomeIDLKernel_la_CPPFLAGS =-I$(top_builddir)/salome_adm/unix -include SALOMEconfig.h \
                                -I$(top_builddir)/idl \
                                @CORBA_CXXFLAGS@ @CORBA_INCLUDES@
 libSalomeIDLKernel_la_LDFLAGS = -no-undefined -version-info=0:0:0
 libSalomeIDLKernel_la_LIBADD  = @CORBA_LIBS@
 
 nodist_libSalomeParallelIDLKernel_la_SOURCES = $(PAR) $(GEN_PACO)
-libSalomeParallelIDLKernel_la_CPPFLAGS =-I$(top_builddir)/idl \
+libSalomeParallelIDLKernel_la_CPPFLAGS =-I$(top_builddir)/salome_adm/unix -include SALOMEconfig.h \
+                                       -I$(top_builddir)/idl \
                                        @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ \
                                        @PACO_INCLUDES@
 libSalomeParallelIDLKernel_la_LDFLAGS = -no-undefined -version-info=0:0:0
index b2d2a9a5f5dbaf40797c041ae2fef94e40616ec0..0597e7822d2fd476ba377135f1bf3eadd783c9f7 100644 (file)
@@ -34,7 +34,7 @@ DEPRECATED_FILES=\
 # rules for install and build (see make_common_starter.am)
 salomeadmux_DATA = SALOMEconfig.h.in
 salomeinclude_DATA = SALOMEconfig.h
-BUILT_SOURCES=SALOMEconfig.h SALOMEconfig.h.in
+BUILT_SOURCES=SALOMEconfig.ref SALOMEconfig.h SALOMEconfig.h.in
 
 mostlyclean-local:
        -rm -rf SALOMEconfig.h SALOMEconfig.h.in
@@ -45,9 +45,11 @@ SALOMEconfig.h.in : SALOMEconfig.ref.in
 # test if SALOMEconfig.ref has changed (contents), at build time
 SALOMEconfig.h: $(top_builddir)/salome_adm/unix/SALOMEconfig.ref
        @if ! [ -a $@ ]; then \
+         echo cp -p $< $@;   \
          cp -p $< $@;        \
        fi;                   \
-       if ! cmp $< $@; then  \
+       if ! cmp -s $< $@; then  \
+         echo cp -p $< $@;   \
          cp -p $< $@;        \
        fi;
 
index 78688bd880cdd3e9e5375612d6a99a28ace3f936..923fef3562fb65856e289d6fb4401fa6056627f4 100644 (file)
@@ -71,4 +71,8 @@
 #undef PACKAGE_VERSION
 #endif
 
+#ifdef _POSIX_C_SOURCE
+#undef _POSIX_C_SOURCE
+#endif
+
 #endif
index ab2ba319dd9586d665d06135966fe590c19ec3c9..c490e6596f2c3be7a7ae875a7075cfb11982399a 100644 (file)
@@ -187,8 +187,7 @@ if test "x$occ_ok" = xyes ; then
   
   AC_CACHE_VAL(salome_cv_lib_occ,[
     AC_TRY_LINK(
-#include <TCollection_AsciiString.hxx>
-,   size_t size;
+#include <TCollection_AsciiString.hxx>,
     TCollection_AsciiString aStr ("toto");
     aStr.Capitalize();, 
     eval "salome_cv_lib_occ=yes",eval "salome_cv_lib_occ=no")
index a657696acf0641fb55ac7ca91e363094ef5d28e7..b228a5ddc04b91aee1ae3f4450439914f1bb2413 100644 (file)
@@ -124,7 +124,7 @@ namespace Batch {
       _sec   = p_tm->tm_sec;
 
     } else {
-      char c;
+//       char c;
 //       istringstream ist(s);
 //       ist >> _day   >> c
 //       >> _month >> c
index ad778fa147fa92b6d0d5bf492852ee6deb57d6cc..58dfacc87add9be634bf2f22616d41338d1299b2 100644 (file)
@@ -184,7 +184,7 @@ namespace Batch {
   ostream & operator << (ostream & os, const Versatile & V)
   {
     Versatile::const_iterator it;
-    char * sep = "";
+    const char * sep = "";
 
     for(it=V.begin(); it!=V.end(); it++, sep=" ") {
       string s = (*it)->affiche();
index 4ff9731e87aae1b9c9e57e6af884fe9c064dfd2e..f27bc4f3ca586aa8f7ec125d1ca5a53543350a59 100644 (file)
@@ -43,7 +43,7 @@
 
   // Ask omniORBpy to transform SUPPORT (python Corba) ptr to IOR string
 
-  PyObject* iorSupport = PyObject_CallMethod(orb, "object_to_string", "O", $input);
+  PyObject* iorSupport = PyObject_CallMethod(orb, (char*)"object_to_string", (char*)"O", $input);
  
   if (iorSupport == Py_None)
     return NULL;
@@ -52,7 +52,7 @@
   // Ask omniORB to convert IOR string to SALOME::SenderDouble_ptr
 
   int argc = 0;
-  char *xargv = "";
+  char *xargv = (char*)"";
   char **argv = &xargv;
   CORBA::ORB_var ORB = CORBA::ORB_init(argc, argv);
   CORBA::Object_var O =  ORB->string_to_object(s);
@@ -73,7 +73,7 @@
 
   // Ask omniORBpy to transform SUPPORT (python Corba) ptr to IOR string
 
-  PyObject* iorSupport = PyObject_CallMethod(orb, "object_to_string", "O", $input);
+  PyObject* iorSupport = PyObject_CallMethod(orb, (char*)"object_to_string", (char*)"O", $input);
  
   if (iorSupport == Py_None)
     return NULL;
@@ -82,7 +82,7 @@
   // Ask omniORB to convert IOR string to SALOME::SenderInt_ptr
 
   int argc = 0;
-  char *xargv = "";
+  char *xargv = (char*)"";
   char **argv = &xargv;
   CORBA::ORB_var ORB = CORBA::ORB_init(argc, argv);
   CORBA::Object_var O =  ORB->string_to_object(s);
    PyObject* orb = PyDict_GetItemString(pdict, "o");
    // Get the orb Corba C++
    int argc = 0;
-   char *xargv = "";
+   char *xargv = (char*)"";
    char **argv = &xargv;
    CORBA::ORB_var ORB = CORBA::ORB_init(argc, argv);
    std::string s =  ORB->object_to_string($1);
    PyObject * tmp = PyString_FromString(s.c_str());
-   $result = PyObject_CallMethod(orb, "string_to_object", "O", tmp);
+   $result = PyObject_CallMethod(orb, (char*)"string_to_object", (char*)"O", tmp);
 }
 
 %typemap(python,out) SALOME::SenderInt_ptr
    PyObject* orb = PyDict_GetItemString(pdict, "o");
    // Get the orb Corba C++
    int argc = 0;
-   char *xargv = "";
+   char *xargv = (char*)"";
    char **argv = &xargv;
    CORBA::ORB_var ORB = CORBA::ORB_init(argc, argv);
    std::string s =  ORB->object_to_string($1);
    PyObject * tmp = PyString_FromString(s.c_str());
-   $result = PyObject_CallMethod(orb, "string_to_object", "O", tmp);
+   $result = PyObject_CallMethod(orb, (char*)"string_to_object", (char*)"O", tmp);
 }
 
 PyObject * getValueForSenderDouble(SALOME::SenderDouble_ptr senderDouble);
@@ -140,7 +140,7 @@ PyObject * getValueForSenderDouble(SALOME::SenderDouble_ptr senderDouble)
             int err = PyList_SetItem(py_list, i, Py_BuildValue("d", (double) ret[i]));
             if(err)
               {
-                char * message = "Error in SUPPORT::getTypes";
+                const char * message = "Error in SUPPORT::getTypes";
                 PyErr_SetString(PyExc_RuntimeError, message);
                 return NULL;
               }
@@ -167,7 +167,7 @@ PyObject * getValueForSenderInt(SALOME::SenderInt_ptr senderInt)
             int err = PyList_SetItem(py_list, i, Py_BuildValue("i", (int) ret[i]));
             if(err)
               {
-                char * message = "Error in SUPPORT::getTypes";
+                const char * message = "Error in SUPPORT::getTypes";
                 PyErr_SetString(PyExc_RuntimeError, message);
                 return NULL;
               }
@@ -195,7 +195,7 @@ PyObject * getValueForMatrix(SALOME::Matrix_ptr matrix)
            int err = PyList_SetItem(tmpRow, j, Py_BuildValue("d", (double) ret[i*column+j]));
             if(err)
               {
-                char * message = "PyList_SetItem matrix sent may be invalid";
+                const char * message = "PyList_SetItem matrix sent may be invalid";
                 PyErr_SetString(PyExc_RuntimeError, message);
                 return NULL;
               }
index d574fa95cc9515ef94910c860b14c88d9d07bf9d..985fd4e42f7427cf4cc565e962d79766776cca91 100644 (file)
@@ -480,8 +480,8 @@ Engines_Container_i::load_component_Library(const char* componentName)
       PyObject *globals = PyModule_GetDict(mainmod);
       PyObject *pyCont = PyDict_GetItemString(globals, "pyCont");
       PyObject *result = PyObject_CallMethod(pyCont,
-                                             "import_component",
-                                             "s",componentName);
+                                             (char*)"import_component",
+                                             (char*)"s",componentName);
       int ret= PyInt_AsLong(result);
       Py_XDECREF(result);
       SCRUTE(ret);
@@ -557,8 +557,8 @@ Engines_Container_i::create_component_instance(const char*genericRegisterName,
       PyObject *globals = PyModule_GetDict(mainmod);
       PyObject *pyCont = PyDict_GetItemString(globals, "pyCont");
       PyObject *result = PyObject_CallMethod(pyCont,
-                                             "create_component_instance",
-                                             "ssl",
+                                             (char*)"create_component_instance",
+                                             (char*)"ssl",
                                              aCompName.c_str(),
                                              instanceName.c_str(),
                                              studyId);
@@ -1076,8 +1076,12 @@ Engines_Container_i::createInstance(string genericRegisterName,
       SCRUTE(aGenRegisterName);
       SCRUTE(_cntInstances_map[aGenRegisterName]);
       //SCRUTE(servant->pd_refCount);
+#if defined(_DEBUG_) || defined(_DEBUG)
       bool ret_studyId = servant->setStudyId(studyId);
       ASSERT(ret_studyId);
+#else
+      servant->setStudyId(studyId);
+#endif
 
       // --- register the engine under the name
       //     containerName(.dir)/instanceName(.object)
index dcdaed6e10f60f5237bd5f9a0645a81242c0b1f7..d81ac5760aadb50a3e8111872361d048d0346af9 100644 (file)
@@ -30,6 +30,7 @@
 #define _CONTAINER_INIT_PYTHON_HXX_
 
 #include <SALOME_Container.hxx>
+#include <SALOMEconfig.h>
 
 #include <pthread.h>  // must be before Python.h !
 #include <Python.h>
@@ -50,7 +51,7 @@
 #define Py_ACQUIRE_NEW_THREAD \
   PyEval_AcquireLock(); \
   PyThreadState *myTstate = PyThreadState_New(KERNEL_PYTHON::_interp); \
-  PyThreadState *myoldTstate = PyThreadState_Swap(myTstate);
+  PyThreadState_Swap(myTstate);
 
 #define Py_RELEASE_NEW_THREAD \
   PyEval_ReleaseThread(myTstate); \
index 39812040d6c27d0297bb27fe1406cee523776bbb..61401e7f086a802f091fbc19c611b7f7a963c2e5 100644 (file)
@@ -142,8 +142,8 @@ int main(int argc, char* argv[])
 
   if (!isSupervContainer)
     {
-      int _argc = 1;
-      char* _argv[] = {""};
+      // int _argc = 1;
+      // char* _argv[] = {""};
       KERNEL_PYTHON::init_python(argc,argv);
     }
   else
@@ -152,7 +152,7 @@ int main(int argc, char* argv[])
       PySys_SetArgv( argc , argv ) ;
     }
     
-  char *containerName = "";
+  char *containerName = (char *)"";
   if(argc > 1)
     {
       containerName = argv[1] ;
@@ -173,8 +173,7 @@ int main(int argc, char* argv[])
       system(aCommand.str().c_str());
 #endif
       
-      Engines_Container_i * myContainer 
-       = new Engines_Container_i(orb, root_poa, containerName , argc , argv );
+      new Engines_Container_i(orb, root_poa, containerName , argc , argv );
       
       pman->activate();
       
@@ -189,7 +188,7 @@ int main(int argc, char* argv[])
 
       if (!isSupervContainer)
       {
-        PyGILState_STATE gstate = PyGILState_Ensure();
+        PyGILState_Ensure();
         //Delete python container that destroy orb from python (pyCont._orb.destroy())
         Py_Finalize();
       }
index cb1117ed73aa56984565733ffca450658aa4e8a6..6f4d1b6a81b50684acae46ee080ca429780a7229 100644 (file)
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 
 
+#include <SALOMEconfig.h>
 #include <stdexcept>
 #include <omniORB4/CORBA.h>
+
 #include "utilities.h"
 
 // CCRT porting
index 7dfa311b9e857ecbc1e184741a694717db15e24c..3fda8667f7e5227ed773390090423e128520ada3 100644 (file)
@@ -53,8 +53,12 @@ fileRef_i::fileRef_i(Engines::Container_ptr container,
   _container =  Engines::Container::_duplicate(container);
   _origFileName = origFileName;
   _machine = GetHostname();
+#if defined(_DEBUG_) || defined(_DEBUG)
   int OK = addRef(_machine.c_str(), _origFileName.c_str());
   SCRUTE(OK);
+#else
+  addRef(_machine.c_str(), _origFileName.c_str());
+#endif
 }
 
 
index d2cbb1d6e9d7fba0dffc9bc383f7238c6a6d999e..89aae57db797364bff24e3a3bdfb55ddeea01b7c 100644 (file)
@@ -838,8 +838,12 @@ Salome_file_i::getDistributedFile(std::string file_name)
       aBlock = _fileDistributedSource[file_name]->getBlock(fileId);
       toFollow = aBlock->length();
       CORBA::Octet *buf = aBlock->get_buffer();
+#if defined(_DEBUG_) || defined(_DEBUG)
       int nbWri = fwrite(buf, sizeof(CORBA::Octet), toFollow, fp);
       ASSERT(nbWri == toFollow);
+#else
+      fwrite(buf, sizeof(CORBA::Octet), toFollow, fp);
+#endif
       delete aBlock;
     }
     fclose(fp);
index 69dd8920cb378a4c0982ec61d99b78ccb1a93a0c..ee457316f1a0e5c18efa54cf8d70b566228187ae 100644 (file)
@@ -186,9 +186,9 @@ int main (int argc, char * argv[])
   cout << "Test started " << endl;
   
   DF_Application* appli = new DF_Application;
+  /*  
   DF_Document* doc1 = appli->NewDocument("doc_1");
   
-  /*  
   DF_Label root1 = doc1->Main();
   DF_Label child = root1.FindChild(3, true); //0:1:3
   
index 73fd47ed3813f1554bdb5b2e437dbaa57db1164d..90d135d8d0dc4a9de21ef3002fd8b1b32bdd709b 100644 (file)
@@ -82,6 +82,9 @@ struct omniORBpyAPI {
 
 #ifdef WITH_NUMPY
 /* With Numpy */
+#ifdef HAVE_ISINF
+#undef HAVE_ISINF
+#endif
 #include <numpy/arrayobject.h>
 
 typedef PyArrayObject ArrayObject;
@@ -96,7 +99,7 @@ typedef PyArrayObject ArrayObject;
 
 /* Given a PyObject, return a string describing its type.
  */
-char* pytype_string(PyObject* py_obj) {
+const char* pytype_string(PyObject* py_obj) {
   if (py_obj == NULL          ) return "C NULL value";
   if (PyCallable_Check(py_obj)) return "callable"    ;
   if (PyString_Check(  py_obj)) return "string"      ;
@@ -152,8 +155,8 @@ enum NPY_TYPECHAR { NPY_BOOLLTR = '?',
 
 /* Given a Numeric typecode, return a string describing the type.
  */
-char* typecode_string(int typecode) {
-  char* type_names[] = {"bool","byte","unsigned byte","short",
+const char* typecode_string(int typecode) {
+  const char* type_names[] = {"bool","byte","unsigned byte","short",
         "unsigned short","int","unsigned int","long","unsigned long",
         "longlong","unsigned longlong",
         "float","double","long double","complex float","complex double","complex long double",
@@ -180,16 +183,16 @@ PyArrayObject* obj_to_array_no_conversion(PyObject* input, int typecode) {
         ary = (PyArrayObject*) input;
     }
     else if is_array(input) {
-      char* desired_type = typecode_string(typecode);
-      char* actual_type = typecode_string(array_type(input));
+      const char* desired_type = typecode_string(typecode);
+      const char* actual_type = typecode_string(array_type(input));
       PyErr_Format(PyExc_TypeError,
        "Array of type '%s' required.  Array of type '%s' given",
        desired_type, actual_type);
       ary = NULL;
     }
     else {
-      char * desired_type = typecode_string(typecode);
-      char * actual_type = pytype_string(input);
+      const char * desired_type = typecode_string(typecode);
+      const char * actual_type = pytype_string(input);
       PyErr_Format(PyExc_TypeError,
        "Array of type '%s' required.  A %s was given",
        desired_type, actual_type);
@@ -422,10 +425,10 @@ struct stringArray
 %define TYPEMAP_IN3(type,typecode)
 %typemap(in) type* IN_ARRAY3
              (ArrayObject* array=NULL, int is_new_object) {
-  int size[1] = {-1};
   if ((SWIG_ConvertPtr($input, (void **) &$1, $1_descriptor,0)) == -1)
   {
 %#ifdef WITH_NUMPY
+    int size[1] = {-1};
     array = obj_to_array_contiguous_allow_conversion($input, typecode, &is_new_object);
     if (!array || !require_dimensions(array,1) || !require_size(array,size,1)) SWIG_fail;
     $1 = (type*) array->data;
@@ -452,10 +455,10 @@ TYPEMAP_IN3(double,  PyArray_DOUBLE)
 /*  Specific typemap for complex */
 %typemap(in) float*  ecpval
              (ArrayObject* array=NULL, int is_new_object) {
-  int size[1] = {-1};
   if ((SWIG_ConvertPtr($input, (void **) &$1, $1_descriptor,0)) == -1)
   {
 %#ifdef WITH_NUMPY
+    int size[1] = {-1};
     array = obj_to_array_contiguous_allow_conversion($input, PyArray_CFLOAT, &is_new_object);
     if (!array || !require_dimensions(array,1) || !require_size(array,size,1)) SWIG_fail;
     $1 = (float*) array->data;
@@ -472,11 +475,11 @@ TYPEMAP_IN3(double,  PyArray_DOUBLE)
 /* array of strings on input */
 %typemap(in) char** eval
          (ArrayObject* array=NULL, int is_new_object) {
-  int size[1] = {-1};
   stringArray* sarray;
   if ((SWIG_ConvertPtr($input, (void **) &sarray, $descriptor(stringArray *),0)) == -1)
   {
 %#ifdef WITH_NUMPY
+    int size[1] = {-1};
     array = obj_to_array_contiguous_allow_conversion($input, PyArray_STRING, &is_new_object);
     if (!array || !require_dimensions(array,1) || !require_size(array,size,1)) SWIG_fail;
     $1 = (char**) malloc(array_size(array,0)*sizeof(char*));
@@ -512,6 +515,7 @@ TYPEMAP_IN3(double,  PyArray_DOUBLE)
     if (!temp  || !require_contiguous(temp)) SWIG_fail;
     $1 = (type*) temp->data;
 %#else
+    temp = NULL;
     SWIG_exception(SWIG_TypeError, "type* expected");
 %#endif
   }
@@ -538,6 +542,7 @@ TYPEMAP_INPLACE3(double,  PyArray_DOUBLE)
     if (!temp  || !require_contiguous(temp)) SWIG_fail;
     $1 = (float*) temp->data;
 %#else
+    temp = NULL;
     SWIG_exception(SWIG_TypeError, "complex array expected");
 %#endif
   }
@@ -557,6 +562,7 @@ TYPEMAP_INPLACE3(double,  PyArray_DOUBLE)
     for(int i=0;i<array_size(temp,0);i++)
       $1[i]=(char*) temp->data+i*temp->strides[0];
 %#else
+    temp = NULL;
     SWIG_exception(SWIG_TypeError, "string array expected");
 %#endif
   }
index 207f2e7496a43dacdaff68730c5b4c0122f0f0d1..969b510e81bb032a7e0f23df514504bf3f0d0e8f 100644 (file)
@@ -60,7 +60,7 @@ namespace CalciumInterface {
   
   /********************* INTERFACE DE DECONNEXION *****************/
 
-  static void
+  static inline void
   ecp_cd (Superv_Component_i & component, std::string & instanceName)
   { 
     /* TODO : Trouver le nom de l'instance SALOME*/
index 3792dc9a2d2e49bf08ebf35404ea7a91c57e3fd2..da5a20b880e3e1aa6dfcd7720f3247546315b521 100644 (file)
@@ -79,7 +79,7 @@ COMMON_CPPFLAGS= -I$(top_srcdir)/src/DSC/DSC_User \
                 -I$(top_srcdir)/src/Utils \
                 -I$(top_srcdir)/src/Container \
                 -I$(top_srcdir)/src/Notification \
-                -I$(top_builddir)/salome_adm/unix \
+                -I$(top_builddir)/salome_adm/unix -include SALOMEconfig.h \
                 -I$(top_builddir)/idl \
                 @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ @BOOST_CPPFLAGS@
 
index aea01def95a85b8b7a5ddbf62d1d97e73968cd58..8f883d1b60971aa6d87a7151abe12480d14a999c 100644 (file)
@@ -35,7 +35,7 @@ public:
 
   std::cout << "------------  TEST1 --------------" << std::endl;
 
-  int ret=0;
+  // int ret=0;
   
   CORBA::Long time=1,tag=1;
   typedef PalmCouplingPolicy::DataIdContainer DataIdContainer;  
@@ -76,7 +76,7 @@ public:
  
     std::cout << "------------  TEST2 --------------" << std::endl;
 
-   int ret=0;
+    // int ret=0;
   
   CORBA::Long time=1,tag=1;
   typedef PalmCouplingPolicy::DataIdContainer DataIdContainer;  
index ca947860dff1174faad47f9c635ea7f2d6f422d2..935c717a69b7f0557897df73566ca50fc4805bee 100644 (file)
@@ -23,5 +23,5 @@
 //  Author : Eric Fayolle (EDF)
 //  Module : KERNEL
 void fake_method(void) {
-int fake_int;
+  // int fake_int;
 };
index e2b898bbb3342b1a653b6c8537384bfe36fd92f3..96c76359877ec496f0c26c2d97a2f7da97646f90 100644 (file)
@@ -125,7 +125,7 @@ void HDFfile::InternalObjectIndentify(int rank, char *object_name)
     throw HDFexception("Can't identify an internal object");
 }
 
-int HDFfile::ExistInternalObject(char *object_name)
+int HDFfile::ExistInternalObject(const char *object_name)
 {
   int n,i;
   int ret = 0;
index 51c9aa7f12e8c11d247e64570e4a4f0c8316b27c..b1d32881f46384772c535114f3747f7da11f1572 100644 (file)
@@ -51,7 +51,7 @@ public :
 
   int nInternalObjects();
   void InternalObjectIndentify(int rank, char *object_name);
-  int ExistInternalObject(char *object_name);
+  int ExistInternalObject(const char *object_name);
   hdf_object_type InternalObjectType(char *object_name);
 
   int nAttributes();
index 2b0f2fb19fe72a16492b7a3e3353e9d2379cea39..d754e0496d4662664d3174622bf80ee34d6e1b4a 100644 (file)
@@ -100,7 +100,7 @@ void HDFgroup::InternalObjectIndentify(int rank, char *object_name)
     throw HDFexception("Can't identify an internal object");
 }
 
-int HDFgroup::ExistInternalObject(char *object_name)
+int HDFgroup::ExistInternalObject(const char *object_name)
 {
   int n,i;
   int ret = 0;
index 8c0d02b889a758e9bbcd948a12bc88d3f3499533..07e79e36e20810f0a734ab08648599fb0f2001b9 100644 (file)
@@ -56,7 +56,7 @@ public :
 
   int nInternalObjects();
   void InternalObjectIndentify(int rank, char *object_name);
-  int ExistInternalObject(char *object_name);
+  int ExistInternalObject(const char *object_name);
   hdf_object_type InternalObjectType(char *object_name);
 
   int nAttributes();
index ac48c4a419bec94a7528d17f3feb019091f180ae..19e08dbae7c185539d7064ee4b220abf5ee21b2f 100644 (file)
@@ -39,7 +39,7 @@ SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
 hdf_err Num(hdf_idt id,const char *name, void *data);
 
 hdf_err
-HDFnObjects(hdf_idt fid,char *path,int *n)
+HDFnObjects(hdf_idt fid,const char *path,int *n)
 {
   int idx;
   int m = 0;
index e5919d9e8259b4fd4bd6ea303bc61084bce3a0b1..8e87e3932ca59f5ab128ecf59399edecd397aa2a 100644 (file)
@@ -40,7 +40,7 @@ SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
 
 hdf_err RankInfo(hdf_idt id, const char *name, void *data);
 
-hdf_err HDFobjectIdentify(hdf_idt fid,char *path,int i,char *name)
+hdf_err HDFobjectIdentify(hdf_idt fid,const char *path,int i,char *name)
 {
   int idx;
 
index 5bdc62da6ab178458bbbab9e8c364acb7a747e02..d5115dd208cfd183b24240c0806ed7e25daaaddc 100644 (file)
@@ -115,10 +115,10 @@ void HDFerrorModeLock();
 
 extern
 hdf_err
-HDFnObjects(hdf_idt fid,char *path,int *n);
+HDFnObjects(hdf_idt fid,const char *path,int *n);
 
 extern
-hdf_err HDFobjectIdentify(hdf_idt fid,char *path,int i,char *name);
+hdf_err HDFobjectIdentify(hdf_idt fid,const char *path,int i,char *name);
 
 extern
 hdf_err HDFobjectType(hdf_idt id, char *name, hdf_object_type *type);
index 8a92e1d875a526765374dde2fea676bc425cb66e..7f2d491c5705a05ab61d406293dba1ced818c438 100644 (file)
@@ -21,6 +21,7 @@
 #include "Batch_FactBatchManager_eLSF.hxx"
 #include "Batch_FactBatchManager_ePBS.hxx"
 #include "Launcher.hxx"
+#include "utilities.h"
 #include <iostream>
 #include <sstream>
 #include <sys/stat.h>
@@ -38,7 +39,7 @@ using namespace std;
 
 Launcher_cpp::Launcher_cpp()
 {
-  cerr << "Launcher_cpp constructor" << endl;
+  MESSAGE ( "Launcher_cpp constructor" );
 }
 
 //=============================================================================
@@ -49,7 +50,7 @@ Launcher_cpp::Launcher_cpp()
 
 Launcher_cpp::~Launcher_cpp()
 {
-  cerr << "Launcher_cpp destructor" << endl;
+  MESSAGE ( "Launcher_cpp destructor" );
   std::map < string, Batch::BatchManager_eClient * >::const_iterator it1;
   for(it1=_batchmap.begin();it1!=_batchmap.end();it1++)
     delete it1->second;
@@ -73,7 +74,7 @@ long Launcher_cpp::submitSalomeJob( const string fileToExecute ,
                                    const batchParams& batch_params,
                                    const machineParams& params) throw(LauncherException)
 {
-  cerr << "BEGIN OF Launcher_cpp::submitSalomeJob" << endl;
+  MESSAGE ( "BEGIN OF Launcher_cpp::submitSalomeJob" );
   long jobId;
   vector<string> aMachineList;
 
@@ -94,7 +95,7 @@ long Launcher_cpp::submitSalomeJob( const string fileToExecute ,
 
   ParserResourcesType p = _ResManager->GetResourcesList(aMachineList[0]);
   string clustername(p.Alias);
-  cerr << "Choose cluster: " <<  clustername << endl;
+  MESSAGE ( "Choose cluster: " <<  clustername );
   
   // search batch manager for that cluster in map or instanciate one
   map < string, Batch::BatchManager_eClient * >::const_iterator it = _batchmap.find(clustername);
@@ -285,18 +286,18 @@ Batch::BatchManager_eClient *Launcher_cpp::FactoryBatchManager( const ParserReso
     mpi = "indif";
     break;
   }    
-  cerr << "Instanciation of batch manager" << endl;
+  MESSAGE ( "Instanciation of batch manager" );
   switch( params.Batch ){
   case pbs:
-    cerr << "Instantiation of PBS batch manager" << endl;
+    MESSAGE ( "Instantiation of PBS batch manager" );
     fact = new Batch::FactBatchManager_ePBS;
     break;
   case lsf:
-    cerr << "Instantiation of LSF batch manager" << endl;
+    MESSAGE ( "Instantiation of LSF batch manager" );
     fact = new Batch::FactBatchManager_eLSF;
     break;
   default:
-    cerr << "BATCH = " << params.Batch << endl;
+    MESSAGE ( "BATCH = " << params.Batch );
     throw LauncherException("no batchmanager for that cluster");
   }
   return (*fact)(hostname.c_str(),protocol.c_str(),mpi.c_str());
@@ -406,7 +407,7 @@ string Launcher_cpp::buildSalomeCouplingScript(const string fileToExecute, const
   tempOutputFile.flush();
   tempOutputFile.close();
   chmod(TmpFileName.c_str(), 0x1ED);
-  cerr << TmpFileName.c_str() << endl;
+  MESSAGE ( TmpFileName.c_str() );
 
   delete mpiImpl;
 
@@ -470,8 +471,8 @@ string Launcher_cpp::getRemoteFile( std::string remoteDir, std::string localFile
 bool Launcher_cpp::check(const batchParams& batch_params)
 {
   bool rtn = true;
-  cerr << "Job parameters are :" << endl;
-  cerr << "Directory : $HOME/Batch/$date" << endl;
+  MESSAGE ( "Job parameters are :" );
+  MESSAGE ( "Directory : $HOME/Batch/$date" );
 
   // check expected_during_time (check the format)
   std::string edt_info = batch_params.expected_during_time;
@@ -508,7 +509,7 @@ bool Launcher_cpp::check(const batchParams& batch_params)
   else {
     edt_info = "No value given";
   }
-  cerr << "Expected during time : " << edt_info << endl;;
+  MESSAGE ( "Expected during time : " << edt_info );
 
   // check memory (check the format)
   std::string mem_info;
@@ -534,7 +535,7 @@ bool Launcher_cpp::check(const batchParams& batch_params)
   else {
     mem_info = "No value given";
   }
-  cerr << "Memory : " << mem_info << endl;
+  MESSAGE ( "Memory : " << mem_info );
 
   // check nb_proc
   std::string nb_proc_info;
@@ -548,7 +549,7 @@ bool Launcher_cpp::check(const batchParams& batch_params)
   else {
     nb_proc_info = nb_proc_value.str();
   }
-  cerr << "Nb of processors : " << nb_proc_info << endl;
+  MESSAGE ( "Nb of processors : " << nb_proc_info );
 
   return rtn;
 }
@@ -616,7 +617,7 @@ Launcher_cpp::getHomeDir(const ParserResourcesType& p, const std::string& tmpdir
     command += p.Alias;
     command += " 'echo $HOME' > ";
     command += filelogtemp;
-    std::cerr << command.c_str() << std::endl;
+    MESSAGE ( command.c_str() );
     int status = system(command.c_str());
     if(status)
       throw LauncherException("Error of launching home command on remote host");
index d05a22bbac0377e0aff58f6d82d59a065f31bef5..848a21f1d2a9801bf6c9d28b3b30f11673a9a3f7 100644 (file)
@@ -111,7 +111,7 @@ libLauncher_la_SOURCES=\
        Launcher.cxx
 
 libLauncher_la_CPPFLAGS =\
-       -I$(srcdir)/../Batch \
+       $(COMMON_CPPFLAGS) \
        -I$(srcdir)/../ResourcesManager \
        @MPI_INCLUDES@ \
        @LIBXML_INCLUDES@
index 895c53581b70532adeede7e40b689b70858d961a..4ce5d8b973534c46fcf0fe47aece27f16d543b35 100644 (file)
@@ -183,9 +183,13 @@ string SALOME_FileTransferCORBA::getLocalFile(string localFile)
              toFollow = aBlock->length();
              SCRUTE(toFollow);
              CORBA::Octet *buf = aBlock->get_buffer();
+#if defined(_DEBUG_) || defined(_DEBUG)
              int nbWri = fwrite(buf, sizeof(CORBA::Octet), toFollow, fp);
-              delete aBlock;
              ASSERT(nbWri == toFollow);
+#else
+             fwrite(buf, sizeof(CORBA::Octet), toFollow, fp);
+#endif
+              delete aBlock;
            }
          fclose(fp);
          MESSAGE("end of transfer");
index d1b105a37dd662447a82f572c2a3ef2d01a0c925..9b399893d0ae808959e72bf6994f99804b6a8f9a 100644 (file)
@@ -82,7 +82,7 @@ SALOME_LifeCycleCORBA::SALOME_LifeCycleCORBA(SALOME_NamingService *ns)
   // be sure to have an instance of traceCollector, when used via SWIG
   // in a Python module
   int argc = 0;
-  char *xargv = "";
+  char *xargv = (char*)"";
   char **argv = &xargv;
   CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);
   //  LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
index 2c724e369cfbba30f4e650747045547a6c83156c..7a047fd388967eaab2ab1f7bed5ce46402696bb1 100644 (file)
@@ -64,7 +64,7 @@ LifeCycleCORBATest::setUp()
   bp1->deleteInstance(bp1);
 
   // --- trace on file
-  char *theFileName = TRACEFILE;
+  const char *theFileName = TRACEFILE;
 
   string s = "file:";
   s += theFileName;
@@ -84,7 +84,7 @@ LifeCycleCORBATest::setUp()
   // --- Get or initialize the orb
 
   int _argc = 1;
-  char* _argv[] = {""};
+  char* _argv[] = {(char*)""};
   ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
   ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting());
   _orb = init(_argc , _argv ) ;
index a0333207151754a724a911424ff5bdbf42cfc4f1..24ef7ba8e72e9fac94c7846178fc5b3c293fa423 100644 (file)
@@ -12,6 +12,7 @@
 #define AFX_LOGGER_H__96F2A3AB_F6F8_11D6_BFA6_000476A0958C__INCLUDED_
 
 #include <strstream>
+#include <SALOMEconfig.h>
 #include "Logger.hh"
 
 //these declarations for files don't using OCC includes (for example HDF)
index 965982293b32d97fd5e03564deb4631bb21248c4..80347d690597e17ffb7974efef8290b9510fd1be 100644 (file)
@@ -339,7 +339,7 @@ CORBA::Object_ptr SALOME_NamingService::Resolve(const char* Path)
 
   CosNaming::Name context_name;
   vector<string> splitPath;
-  int dimension_resultat = _createContextNameDir(Path,
+  _createContextNameDir(Path,
                                                 context_name,
                                                 splitPath,
                                                 false);
@@ -803,7 +803,7 @@ throw(ServiceUnreachable)
 //   SCRUTE(path);
   CosNaming::Name context_name;
   vector<string> splitPath;
-  int dimension_resultat = _createContextNameDir(path.c_str(),
+  _createContextNameDir(path.c_str(),
                                                 context_name,
                                                 splitPath,
                                                 true);
index 2a9e1fca2b76c3d34d88cafb6d4c732259e3f169..690c3dfd7cb835069d5b071bda3d42eb3037b6d7 100644 (file)
@@ -111,7 +111,7 @@ NamingServiceTest::setUp()
   bp1->deleteInstance(bp1);
 
   // --- trace on file
-  char *theFileName = TRACEFILE;
+  const char *theFileName = TRACEFILE;
 
   string s = "file:";
   s += theFileName;
@@ -131,7 +131,7 @@ NamingServiceTest::setUp()
   // --- Get or initialize the orb
 
   int _argc = 1;
-  char* _argv[] = {""};
+  char* _argv[] = {(char*)""};
   ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
   ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting());
   _orb = init(_argc , _argv ) ;
index 52a3d1e9a75423b7ec2d9e44958d6291eed12e93..939c1adc61d708f8365bea76b044dc8cc8499ab0 100644 (file)
@@ -59,15 +59,19 @@ RegistryService::~RegistryService()
        map<int,client_infos *>::iterator im;
        for (im=_reg.begin();im!=_reg.end(); im++)
         {
+#if defined(_DEBUG_) || defined(_DEBUG)
                const client_infos &lesInfos = *(*im).second ;
                MESSAGE("Deletion") ; SCRUTE( lesInfos._name ) ;
+#endif
                _reg.erase ( im ) ;
        }
        ASSERT(_reg.size()==0) ;
        for (im=_fin.begin();im!=_fin.end(); im++)
         {
+#if defined(_DEBUG_) || defined(_DEBUG)
                const client_infos &lesInfos = *(*im).second ;
                MESSAGE("Deletion") ; SCRUTE( lesInfos._name ) ;
+#endif
                _fin.erase ( im ) ;
        }
        ASSERT(_fin.size()==0) ;
index ddf3712ff8f4d1586dd52494724251cb8185fb0d..06dc126ed7dbd261d4f46af811b6e885fb610823 100644 (file)
@@ -118,7 +118,7 @@ ResourcesManager_cpp::GetFittingResources(const machineParams& params,
   ParseXmlFile();
 
   const char *hostname = params.hostname.c_str();
-  INFOS ( "GetFittingResources " << hostname << " " << GetHostname().c_str() );
+  MESSAGE ( "GetFittingResources " << hostname << " " << GetHostname().c_str() );
 
   if (hostname[0] != '\0'){
     //       cerr << "ResourcesManager_cpp::GetFittingResources : hostname specified" << endl;
index 57c00c16f2dd83273167107e2495e47c59bb0e09..8ee2138d2d080bf61c10fc3949113fab532eed1d 100644 (file)
@@ -138,7 +138,7 @@ SALOMEDS_EXPORT
     PortableServer::ObjectId_var aStudyManager_iid =  root_poa->activate_object(aStudyManager_i);
     //give ownership to the poa : the object will be deleted by the poa
     aStudyManager_i->_remove_ref();
-    aStudyManager_i->register_name("/myStudyManager");
+    aStudyManager_i->register_name((char*)"/myStudyManager");
   }
   return new SALOMEDS_StudyManager();
 }
index 804f4b1486f249804c65f4e67f35147a41734966..b420c7e7280799771ac5719a972777b27b640e90 100644 (file)
@@ -43,7 +43,7 @@ std::string SALOMEDS_AttributeUserID::Value()
   std::string aValue;
   if (_isLocal) {
     SALOMEDS::Locker lock;
-    char guid[40];
+    // char guid[40];
     aValue = dynamic_cast<SALOMEDSImpl_AttributeUserID*>(_local_impl)->Value();
   }
   else aValue = SALOMEDS::AttributeUserID::_narrow(_corba_impl)->Value();
index b0666a4d2a6990e7ea5df4556f76313a237645f8..56657e5b3b5e03eaec2a7e841afa62a137be41eb 100644 (file)
@@ -59,7 +59,7 @@ SALOMEDS_GenericAttribute::SALOMEDS_GenericAttribute(SALOMEDS::GenericAttribute_
 
   CORBA::LongLong addr = theGA->GetLocalImpl(GetHostname().c_str(), pid, _isLocal);
   if(_isLocal) {
-    _local_impl = ((SALOMEDSImpl_GenericAttribute*)(addr));
+    _local_impl = reinterpret_cast<SALOMEDSImpl_GenericAttribute*>(addr);
     _corba_impl = SALOMEDS::GenericAttribute::_nil();
   }
   else {
index 6c25a767af094a45e8a51ccb36206a1603e5fd27..78a3006e5e7f6b7e2e8e46461666d0663de53e08 100644 (file)
@@ -82,7 +82,7 @@ char* SALOMEDS_GenericAttribute_i::Type()
     return CORBA::string_dup(SALOMEDSImpl_GenericAttribute::Impl_GetType(_impl));
   }    
 
-  return "";
+  return (char*)"";
 }
 
 char* SALOMEDS_GenericAttribute_i::GetClassType()
@@ -92,7 +92,7 @@ char* SALOMEDS_GenericAttribute_i::GetClassType()
     return CORBA::string_dup(SALOMEDSImpl_GenericAttribute::Impl_GetClassType(_impl));
   }
 
-  return "";
+  return (char*)"";
 }
 
 
@@ -122,5 +122,5 @@ CORBA::LongLong SALOMEDS_GenericAttribute_i::GetLocalImpl(const char* theHostnam
   long pid = (long)getpid();
 #endif
   isLocal = (strcmp(theHostname, GetHostname().c_str()) == 0 && pid == thePID)?1:0;
-  return ((CORBA::LongLong)_impl);
+  return reinterpret_cast<CORBA::LongLong>(_impl);
 }
index b7b6e741064ebd6e948fecb6c5908f3e2f359334..2110c24dc8d46c2d2eff19d457ac9319f88496da 100644 (file)
@@ -63,7 +63,7 @@ SALOMEDS_SObject::SALOMEDS_SObject(SALOMEDS::SObject_ptr theSObject)
   theSObject->GetLocalImpl(GetHostname().c_str(), pid, _isLocal);
 
   if(_isLocal) {
-    _local_impl = ((SALOMEDSImpl_SObject*)(addr));
+    _local_impl = reinterpret_cast<SALOMEDSImpl_SObject*>(addr);
     _corba_impl = SALOMEDS::SObject::_duplicate(theSObject);
   }
   else {
index 9af322638b78b7f05b656603f101e47cbca70c00..08eddaa70b486a2b63dc0e5cfd8c82dc3a85f124 100644 (file)
@@ -332,5 +332,5 @@ CORBA::LongLong SALOMEDS_SObject_i::GetLocalImpl(const char* theHostname, CORBA:
   long pid = (long)getpid();
 #endif
   isLocal = (strcmp(theHostname, GetHostname().c_str()) == 0 && pid == thePID)?1:0;
-  return ((CORBA::LongLong)(void*)_impl);
+  return reinterpret_cast<CORBA::LongLong>(_impl);
 }
index 0aa3a240d9f6135a436e0d09dcb9b17ed9826450..3bfebc5b0101a29da7f1d4e666ceaeb0b3175dad 100644 (file)
@@ -81,7 +81,7 @@ SALOMEDS_Study::SALOMEDS_Study(SALOMEDS::Study_ptr theStudy)
 
   long addr = theStudy->GetLocalImpl(GetHostname().c_str(), pid, _isLocal);
   if(_isLocal) {
-    _local_impl = ((SALOMEDSImpl_Study*)(addr));
+    _local_impl = reinterpret_cast<SALOMEDSImpl_Study*>(addr);
     _corba_impl = SALOMEDS::Study::_duplicate(theStudy);
   }
   else {
index 1dae939cc4bb9ddc814c480c1e25b53fd97b38ed..edff1f88f8bfa58c55c63dfd2b03ed2c1f73e374 100644 (file)
@@ -59,7 +59,7 @@ SALOMEDS_StudyManager::SALOMEDS_StudyManager(SALOMEDS::StudyManager_ptr theManag
 
   CORBA::LongLong addr = theManager->GetLocalImpl(GetHostname().c_str(), pid, _isLocal);
   if(_isLocal) {
-    _local_impl = ((SALOMEDSImpl_StudyManager*)(addr));
+    _local_impl = reinterpret_cast<SALOMEDSImpl_StudyManager*>(addr);
     _corba_impl = SALOMEDS::StudyManager::_duplicate(theManager);
   }
   else {
@@ -87,7 +87,7 @@ SALOMEDS_StudyManager::SALOMEDS_StudyManager()
 
   CORBA::LongLong addr = theManager->GetLocalImpl(GetHostname().c_str(), pid, _isLocal);
   if(_isLocal) {
-    _local_impl = ((SALOMEDSImpl_StudyManager*)(addr));
+    _local_impl = reinterpret_cast<SALOMEDSImpl_StudyManager*>(addr);
     _corba_impl = SALOMEDS::StudyManager::_duplicate(theManager);
   }
   else {
index 7c5abcb944652f5d1509847e304d8e17661f039c..d40b1d772ec3e51f92bf7932b4c0e3e70828c877 100644 (file)
@@ -98,7 +98,7 @@ SALOMEDS_StudyManager_i::~SALOMEDS_StudyManager_i()
  *             context name
  */
 //============================================================================
-void SALOMEDS_StudyManager_i::register_name(char * name)
+void SALOMEDS_StudyManager_i::register_name(const char * name)
 {
   SALOMEDS::StudyManager_var aManager(_this());
   _name_service->Register(aManager.in(), name);
@@ -476,7 +476,7 @@ CORBA::LongLong SALOMEDS_StudyManager_i::GetLocalImpl(const char* theHostname, C
   long pid = (long)getpid();
 #endif
   isLocal = (strcmp(theHostname, GetHostname().c_str()) == 0 && pid == thePID)?1:0;
-  return ((CORBA::LongLong)(void*)_impl);
+  return reinterpret_cast<CORBA::LongLong>(_impl);
 }
 
 //===========================================================================
index a7ec9b17e3f47080db104cae357414e8b9a3f48a..d837acba1cf300ab367f946bdc658bc3b4a7bd93 100644 (file)
@@ -72,7 +72,7 @@ public:
   /*!
     \param char* arguments, the context to register the study manager in the NS
   */  
-  void register_name(char * name);
+  void register_name(const char * name);
   
  //! method to Create a New Study of name study_name
   /*!
index 137c34bd511777832eb72fd2f8e5a44efc84297c..1f5f2a1275ef5f44eab8ad873f2fa1713fa61ad6 100644 (file)
@@ -889,5 +889,5 @@ CORBA::LongLong SALOMEDS_Study_i::GetLocalImpl(const char* theHostname, CORBA::L
   long pid = (long)getpid();
 #endif  
   isLocal = (strcmp(theHostname, GetHostname().c_str()) == 0 && pid == thePID)?1:0;
-  return ((CORBA::LongLong)_impl);
+  return reinterpret_cast<CORBA::LongLong>(_impl);
 }
index 68de91733a8be24b4e57a7ba8aba84685ddd0d6e..5c8a88280c2905d396c877519d85afcd103f2304 100644 (file)
@@ -51,7 +51,7 @@ using namespace std;
 void SALOMEDSTest::setUp()
 {  
   int argc = 1;
-  char* argv[] = {""};
+  char* argv[] = {(char*)""};
 
   ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
   ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting());
@@ -128,7 +128,7 @@ void SALOMEDSTest::tearDown()
 void SALOMEDSTest_Embedded::setUp()
 {  
   int argc = 1;
-  char* argv[] = {""};
+  char* argv[] = {(char*)""};
 
   ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
   ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting());
index b8c88df49b3f45dafcbddeb0fcb76398b394ecf9..866265851d52e77718be717e1d0e41961363f276 100644 (file)
@@ -68,7 +68,7 @@ void SALOMEDSImpl_AttributeIOR::SetValue(const std::string& theValue)
 {
   CheckLocked();
 
-  SALOMEDSImpl_Study* aStudy = SALOMEDSImpl_Study::GetStudy(Label());
+  SALOMEDSImpl_Study::GetStudy(Label());
 
   Backup();
   myString = theValue;
index 350dc0b284ebed33530d6879dd18d82acd4ea9f0..8966b054e6c50fa0df24f836d772808e97b3d53e 100644 (file)
@@ -561,7 +561,7 @@ void SALOMEDSImpl_AttributeTableOfString::Load(const string& value)
     if(aStr[0] == '0') //If the first character of the key is 0, then empty value
       aValue = "";
     else {
-      long aSize = strtol(v[pos++].c_str(), NULL, 10);
+      strtol(v[pos++].c_str(), NULL, 10);
       aValue = v[pos++];
     }
     myTable[aKey] = aValue;
index d64f5eafb47c8d1e0c8a6ba6c4c815555ca884f4..6646fbba602d2da2e1b9f643b51728f5bd189b70 100644 (file)
@@ -65,7 +65,7 @@ BaseTraceCollector* FileTraceCollector::instance(const char *fileName)
          sem_init(&_sem,0,0); // to wait until run thread is initialized
          pthread_t traceThread;
          int bid = 0;
-         int re2 = pthread_create(&traceThread, NULL,
+         pthread_create(&traceThread, NULL,
                                   FileTraceCollector::run, (void *)bid);
          sem_wait(&_sem);
          _singleton = myInstance; // _singleton known only when init done
@@ -121,7 +121,7 @@ void* FileTraceCollector::run(void *bid)
          //break;
        }
 
-      int fullBuf = myTraceBuffer->retrieve(myTrace);
+      myTraceBuffer->retrieve(myTrace);
       if (myTrace.traceType == ABORT_MESS)
        {
 #ifndef WNT
index f41e57593b0c60599283b6b11c3468b1f44a820e..a840d3f4a8efdfc3bc1eaba4c7efcce18725cd30 100644 (file)
@@ -87,8 +87,7 @@ LocalTraceBufferPool* LocalTraceBufferPool::instance()
          DEVTRACE("New buffer pool");
          LocalTraceBufferPool* myInstance = new LocalTraceBufferPool(); 
 
-         DESTRUCTOR_OF<LocalTraceBufferPool> *ptrDestroy =
-           new DESTRUCTOR_OF<LocalTraceBufferPool> (*myInstance);
+         new DESTRUCTOR_OF<LocalTraceBufferPool> (*myInstance);
          _singleton = myInstance;
 
          // --- start a trace Collector
@@ -101,7 +100,7 @@ LocalTraceBufferPool* LocalTraceBufferPool::instance()
            }
          else if (strncmp(traceKind,"file",strlen("file"))==0)
            {
-             char *fileName;
+             const char *fileName;
              if (strlen(traceKind) > strlen("file"))
                fileName = &traceKind[strlen("file")+1];
              else
index f341706576d8df1f38ed6200bfa12705e86e09fe..dbd9740c1c19b372cea8b0996d6551d043a14ba1 100644 (file)
@@ -56,7 +56,7 @@ BaseTraceCollector* LocalTraceCollector::instance()
 
          sem_init(&_sem,0,0); // to wait until run thread is initialized
          pthread_t traceThread;
-         int re2 = pthread_create(&traceThread, NULL,
+         pthread_create(&traceThread, NULL,
                                   LocalTraceCollector::run, NULL);
          sem_wait(&_sem);
          _singleton = myInstance; // _singleton known only when init done
@@ -97,7 +97,7 @@ void* LocalTraceCollector::run(void *bid)
          //break;
        }
 
-      int fullBuf = myTraceBuffer->retrieve(myTrace);
+      myTraceBuffer->retrieve(myTrace);
       if (myTrace.traceType == ABORT_MESS)
        {
          cout << flush ;
index 90bcb4db6e6b2b2c087f5391edabedf11a350dca..0d2a8ad783d140439f64798c959d5f081731b000 100644 (file)
@@ -64,7 +64,7 @@ void
 SALOMELocalTraceTest::testSingletonBufferPool()
 {
   // --- trace on file
-  char *theFileName = TRACEFILE;
+  const char *theFileName = TRACEFILE;
 
   string s = "file:";
   s += theFileName;
@@ -115,7 +115,7 @@ SALOMELocalTraceTest::testLoadBufferPoolLocal()
 
   for(t=0;t<numThread;t++)
     {
-      int ret = pthread_join(threads[t], NULL);
+      pthread_join(threads[t], NULL);
       MESSAGE("--------------------- end of PrintHello thread " << t);
     }
   MESSAGE(" ---- end of PrintHello threads ---- ");
@@ -134,7 +134,7 @@ SALOMELocalTraceTest::testLoadBufferPoolLocal()
 void 
 SALOMELocalTraceTest::testLoadBufferPoolFile()
 {
-  char *theFileName = TRACEFILE;
+  const char *theFileName = TRACEFILE;
 
   string s = "file:";
   s += theFileName;
@@ -161,7 +161,7 @@ SALOMELocalTraceTest::testLoadBufferPoolFile()
 
   for(t=0;t<NUM_THREADS;t++)
     {
-      int ret = pthread_join(threads[t], NULL);
+      pthread_join(threads[t], NULL);
       MESSAGE("--------------------- end of PrintHello thread " << t);
     }
   MESSAGE(" ---- end of PrintHello threads ---- ");
@@ -180,9 +180,11 @@ SALOMELocalTraceTest::testLoadBufferPoolFile()
 
 void *PrintHello(void *threadid)
 {
+#if defined(_DEBUG_) || defined(_DEBUG)
   long id_thread = (long)threadid;
   for (int i=0; i<NUM_MESSAGES;i++)
   MESSAGE("Hello World! This is a trace test : " << id_thread 
         << " - iter " << i);
+#endif
   pthread_exit(NULL);
 }
index b1286b9159ce0e64d7e34e80849e5aea333deed2..aee066270e073dbf56c47dacbdf4f0b35edfe1a0 100644 (file)
@@ -70,7 +70,7 @@ BaseTraceCollector* SALOMETraceCollector::instance()
          sem_init(&_sem,0,0); // to wait until run thread is initialized
          pthread_t traceThread;
          int bid = 0;
-         int re2 = pthread_create(&traceThread, NULL,
+         pthread_create(&traceThread, NULL,
                                   SALOMETraceCollector::run, (void *)bid);
          sem_wait(&_sem);
          _singleton = myInstance; // _singleton known only when init done
@@ -131,7 +131,7 @@ void* SALOMETraceCollector::run(void *bid)
          //break;
        }
 
-      int fullBuf = myTraceBuffer->retrieve(myTrace);
+      myTraceBuffer->retrieve(myTrace);
       if (!CORBA::is_nil(_orb))
        {
          if (myTrace.traceType == ABORT_MESS)
index fe6bcfde31335d73cb11d6680c7cc8596b0ba9ce..b945328c0413780eadb35e8f004e9bdb06f690e8 100644 (file)
@@ -82,7 +82,7 @@ SALOMETraceCollectorTest::testLoadBufferPoolCORBA()
 
   for(t=0;t<NUM_THREADS;t++)
     {
-      int ret = pthread_join(threads[t], NULL);
+      pthread_join(threads[t], NULL);
       MESSAGE("--------------------- end of PrintHello thread " << t);
     }
   MESSAGE(" ---- end of PrintHello threads ---- ");
@@ -101,9 +101,11 @@ SALOMETraceCollectorTest::testLoadBufferPoolCORBA()
 
 void *PrintHello(void *threadid)
 {
+#if defined(_DEBUG_) || defined(_DEBUG)
   long id_thread = (long)threadid;
       for (int i=0; i<NUM_MESSAGES;i++)        
        MESSAGE("Hello World! This is a trace test : " << id_thread 
                << " - iter " << i);
+#endif
   pthread_exit(NULL);
 }
index 4d0ccbc3a547edfa4400573cedafcc3bc8af70eb..deb12a8791f882791c4a99589aa4dd418f86c46b 100644 (file)
@@ -114,7 +114,7 @@ CORBA::Object_ptr TraceCollector_WaitForServerReadiness(CORBA::ORB_ptr orb,
                }
            }
 #ifndef WNT
-         int a = nanosleep(&ts_req,&ts_rem);
+         nanosleep(&ts_req,&ts_rem);
 #else
          Sleep(TIMESleep / 1000000);
 #endif
index e7a59bdc317142863490f0d5b9ed72f827623e02..e7df7d3be7820b59c79301b9ddb1841fe82a8c31 100644 (file)
@@ -27,6 +27,7 @@
 #ifndef _TRACECOLLECTOR_WAITFORSERVERREADINESS_HXX_
 #define _TRACECOLLECTOR_WAITFORSERVERREADINESS_HXX_
 
+#include <SALOMEconfig.h>
 #include <omniORB4/CORBA.h> 
 #include <string>
 
index 221f60d665031bcfdf55e05586c800976d62a161..a3a81c616cebd0a544ca804dd2a4f5edcb698f5c 100644 (file)
@@ -73,7 +73,7 @@ char* Engines_TestComponent_i::Coucou(CORBA::Long L)
 
 void Engines_TestComponent_i::Setenv()
 {
-  bool overwrite = true;
+  // bool overwrite = true;
   map<std::string,CORBA::Any>::iterator it;
   MESSAGE("set environment associated with keys in map _fieldsDict");
   for (it = _fieldsDict.begin(); it != _fieldsDict.end(); it++)
@@ -88,7 +88,7 @@ void Engines_TestComponent_i::Setenv()
          s+='=';
          s+=value;
          //char* cast because 1st arg of linux putenv function is not a const char* !!!
-         int ret=putenv((char *)s.c_str());
+         putenv((char *)s.c_str());
          //End of CCRT porting
          //int ret = setenv(cle.c_str(), value, overwrite);
          MESSAGE("--- setenv: "<<cle<<" = "<< value);
index 0ef063b74f296f90c56a2119401678ab178a1e65..2a2f834ea25c11b2406b3ba6c5eaa7af725d2077 100644 (file)
@@ -62,10 +62,14 @@ static ostream& operator<<(ostream& os, const CORBA::Exception& e)
 Engines::TestComponent_ptr create_instance(Engines::Container_ptr iGenFact,
                                           string componenttName)
 {
+#if defined(_DEBUG_) || defined(_DEBUG)
   bool isLib =
     iGenFact->load_component_Library(componenttName.c_str());
   //    iGenFact->load_component_Library("SalomeTestComponent");
   ASSERT(isLib);
+#else
+  iGenFact->load_component_Library(componenttName.c_str());
+#endif
   CORBA::Object_var obj =
     //    iGenFact->create_component_instance("SalomeTestComponent",
     iGenFact->create_component_instance(componenttName.c_str(),
index dd0c98891683b44ddab375b737e39f16cca13ec2..43bb29a06fbd5505697517ddffa5ff0067fbaacc 100644 (file)
@@ -47,7 +47,7 @@ UtilsTest::setUp()
   bp1->deleteInstance(bp1);
 
   // --- trace on file
-  char *theFileName = TRACEFILE;
+  const char *theFileName = TRACEFILE;
 
   string s = "file:";
   s += theFileName;
index 71818af975a245be9137a50ce55a7b884e786fd1..60c292fb5cd9e35e42b129cb762786a6372fe388 100644 (file)
@@ -40,9 +40,9 @@ extern "C"
 void Nettoyage();
 
 #ifdef _DEBUG_
-static int MYDEBUG = 0;
+// static int MYDEBUG = 0;
 #else
-static int MYDEBUG = 0;
+// static int MYDEBUG = 0;
 #endif
 
 using namespace std;
index 41e24858d9e6b9b135c78a9264d6086f12129c88..d95ea641cf9f831a2beecc7b568f6fd59fef7715 100644 (file)
@@ -51,16 +51,24 @@ const char* duplicate( const char *const str ) ;
 const struct utsname get_uname( void )
 {
        struct utsname          hostid;
+#if defined(_DEBUG_) || defined(_DEBUG)
        const int retour=uname(&hostid);
        ASSERT(retour>=0);
+#else
+       uname(&hostid);
+#endif
        return hostid ;
 }
 
 const char* get_adip( void )
 {
        struct utsname  hostid;
+#if defined(_DEBUG_) || defined(_DEBUG)
        const int retour=uname(&hostid);
        ASSERT(retour>=0);
+#else
+       uname(&hostid);
+#endif
 
        const hostent* pour_adip=gethostbyname(hostid.nodename);
        ASSERT(pour_adip!=NULL);
index 5c9207dbca48887051764ab87d04aaf6bf378dca..979b3e1378f2be7c87bbec799e5c8a8be9bfeadd 100644 (file)
@@ -34,6 +34,9 @@
 # include <exception>
 # include <iostream>
 
+#ifdef LOCALIZED
+#undef LOCALIZED
+#endif
 #ifdef _DEBUG_
 # define LOCALIZED(message) #message , __FILE__ , __LINE__
 #else
index ce11653a7a3a58feaa05dbe073e581ac56b5fbc7..e15c89a55f22ee0611b60d1f399c71f196bc6a01 100644 (file)
@@ -118,10 +118,12 @@ void Utils_Timer::Reset() {
 }
 
 void Utils_Timer::ShowAbsolute(){
+#if defined(_DEBUG_) || defined(_DEBUG)
 #ifndef WNT
     unsigned long Absolute_user = (unsigned long) ((timeval*)RefToCurrentTimeB)->tv_sec ;
 #else
     unsigned long Absolute_user = *RefToCurrentTimeB;
 #endif
     MESSAGE("Absolute time: "   << Absolute_user  << " seconds ");
+#endif
 }