some warnings on windows x64 75/1075/2
Allan CORNET [Tue, 22 Jun 2010 07:16:52 +0000 (09:16 +0200)]
Change-Id: Ifcf5915092534ad11cb4e51485540840641bb414

scilab/modules/parallel/sci_gateway/cpp/sci_parallel_run.cpp
scilab/modules/parallel/src/c/parallel.vcproj
scilab/modules/parallel/src/cpp/parallel_run.hxx

index 4624494..5c95b11 100644 (file)
@@ -9,6 +9,12 @@
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  */
+
+#ifdef _MSC_VER
+/* remove warning about : 'std::fill_n': Function call with parameters that may be unsafe */
+#define _SCL_SECURE_NO_WARNINGS
+#endif
+
 extern "C" {
 #include <stdio.h>
 #include "api_scilab.h"
@@ -593,7 +599,7 @@ namespace
                 double* unused;
                 err= allocMatrixOfDouble(pvApiCtx, ++currentTop, 0, 0, &unused);
             }
-            Nbvars = Rhs+Lhs+sciRhs;
+            Nbvars = Rhs + Lhs + sciRhs;
             bool success(byName
                           ? C2F(scistring)(&sciArgPos, scilabFunctionName, &sciLhs, &sciRhs, static_cast<unsigned long>(scilabFunctionNameLength))
                           : C2F(scifunction)(&sciArgPos, &scilabFunction, &sciLhs, &sciRhs)
index 5569a12..63fb432 100644 (file)
                        <File
                                RelativePath="..\..\sci_gateway\cpp\sci_parallel_run.cpp"
                                >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               DisableSpecificWarnings="4800"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|x64"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               DisableSpecificWarnings="4800"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               DisableSpecificWarnings="4800"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|x64"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               DisableSpecificWarnings="4800"
+                                       />
+                               </FileConfiguration>
                        </File>
                </Filter>
                <Filter
index d5369de..bdd3b5b 100644 (file)
@@ -303,13 +303,13 @@ namespace
             if (dynamic_scheduling)
             {
 #pragma omp parallel for private(i) schedule(dynamic, chunk_size)
-                for(i=0; i < n; ++i)
+                for(i=0; (size_t)i < n; ++i)
                 {
                     callF(i);
                 }
             } else {
 #pragma omp parallel for private(i)  schedule(static, chunk_size)
-                for(i=0; i < n; ++i)
+                for(i=0; (size_t)i < n; ++i)
                 {
                     callF(i);
                 }