Correction warnings -w4 compiler
Allan Cornet [Wed, 6 Dec 2006 19:35:44 +0000 (19:35 +0000)]
13 files changed:
scilab/modules/core/includes/sciquit.h
scilab/modules/core/src/c/CallScilab.c
scilab/modules/core/src/c/Funtab.c
scilab/modules/core/src/c/LoadFunctionsTab.c
scilab/modules/core/src/c/core.vcproj
scilab/modules/core/src/c/hashtable_core.c
scilab/modules/core/src/c/hashtable_core.h
scilab/modules/core/src/c/realmain.c
scilab/modules/core/src/c/sciquit.c
scilab/modules/core/src/c/tmpdir.c
scilab/modules/core/src/c/xscion.c
scilab/modules/scicos/src/c/LibScilab_Import.def
scilab/modules/time/src/realtime.c

index 49bf4d5..2d3715e 100644 (file)
@@ -13,7 +13,7 @@
 
 int C2F(sciquit)(void);
 int ExitScilab(void);
-int sci_exit(int n);
+void sci_exit(int n);
 
 #endif /*__SCIQUIT__*/
 /*-----------------------------------------------------------------------------------*/ 
index 3afc313..eef965c 100644 (file)
@@ -36,6 +36,7 @@ extern void SetWITH_GUI(BOOL ON);
 extern char *GetScilabDirectory(BOOL UnixStyle);
 extern void InitWindowGraphDll(void);
 extern void TextMessage1 (int ctrlflag);
+extern void set_sci_env(char *DefaultSCIPATH);
 #else
 extern int C2F(sxevents)();
 #endif
@@ -43,7 +44,7 @@ extern int C2F(sxevents)();
 #ifdef _MSC_VER
 static void SetSciEnv(void)
 {
-  extern void set_sci_env(char *DefaultSCIPATH);
+  
   
   char *ScilabDirectory=NULL;
 
index 85b95ae..0d2826a 100644 (file)
  ************************************************************/
 int C2F(funtab)(int *id, int *fptr, int *job)
 {
-  int level=0, j=0;
   switch ( *job) 
     {
     case 0 : /* before do a printf for What OBSOLETE */
     break;
     case 1 :
       *fptr=0;
-      action_hashtable_scilab_functions(id,NULL,fptr,&level,SCI_HFUNCTIONS_FIND);
+      action_hashtable_scilab_functions(id,NULL,fptr,SCI_HFUNCTIONS_FIND);
       break;
     case 2 : 
-      action_hashtable_scilab_functions(id,NULL,fptr,&level,SCI_HFUNCTIONS_BACKSEARCH);
+      action_hashtable_scilab_functions(id,NULL,fptr,SCI_HFUNCTIONS_BACKSEARCH);
       break;
     case 3 : 
-      if ( action_hashtable_scilab_functions(id,NULL,fptr,&level,SCI_HFUNCTIONS_ENTER) == FAILED );
+      if ( action_hashtable_scilab_functions(id,NULL,fptr,SCI_HFUNCTIONS_ENTER) == FAILED );
       break;
     case 4 : 
-      action_hashtable_scilab_functions(id,NULL,fptr,&level,SCI_HFUNCTIONS_DELETE);
+      action_hashtable_scilab_functions(id,NULL,fptr,SCI_HFUNCTIONS_DELETE);
       break;
     }
   return(0);
index 776bdb7..625e5bd 100644 (file)
@@ -59,7 +59,7 @@ static int Add_a_Scilab_primitive_in_hashtable(char *str, int *dataI, int *data,
        int zero=0;
        C2F(cvname)(id,str,&zero,strlen(str));
        ldata= (*dataI)*100+*data;
-       return( action_hashtable_scilab_functions(id,str,&ldata,level,SCI_HFUNCTIONS_ENTER));
+       return( action_hashtable_scilab_functions(id,str,&ldata,SCI_HFUNCTIONS_ENTER));
 }
 /*-----------------------------------------------------------------------------------*/
 static int Load_primitives_from_file(char *filename)
@@ -69,10 +69,7 @@ static int Load_primitives_from_file(char *filename)
        {
                #define LineMaxSize 1024
                char Line[LineMaxSize];
-               
-               int i=0;
                FILE *pFile;
-
                int dataI=0;
                int data=0;
                int level=0;
index 91cdd46..cb49ff5 100644 (file)
@@ -42,7 +42,7 @@
                                Name="VCCLCompilerTool"
                                Optimization="0"
                                AdditionalIncludeDirectories=".;../../includes;../../../../libs/MALLOC/includes;../../../gui/src/c/wsci"
-                               PreprocessorDefinitions="_DEBUG;_LIB;STRICT;_CRT_SECURE_NO_DEPRECATE;WITH_TK"
+                               PreprocessorDefinitions="_DEBUG;_LIB;STRICT;_CRT_SECURE_NO_DEPRECATE;WITH_TK;WITH_ATLAS"
                                BasicRuntimeChecks="3"
                                RuntimeLibrary="1"
                                UsePrecompiledHeader="0"
                                InlineFunctionExpansion="1"
                                FavorSizeOrSpeed="1"
                                AdditionalIncludeDirectories=".;../../includes;../../../../libs/MALLOC/includes;../../../gui/src/c/wsci"
-                               PreprocessorDefinitions="NDEBUG;_LIB;STRICT;_CRT_SECURE_NO_DEPRECATE;WITH_TK"
+                               PreprocessorDefinitions="NDEBUG;_LIB;STRICT;_CRT_SECURE_NO_DEPRECATE;WITH_TK;WITH_ATLAS"
                                StringPooling="true"
                                RuntimeLibrary="0"
                                EnableFunctionLevelLinking="true"
index 2e362ce..db38124 100644 (file)
@@ -44,7 +44,7 @@ void destroy_hashtable_scilab_functions()
        }
 }
 /*-----------------------------------------------------------------------------------*/
-int action_hashtable_scilab_functions(int *key,char *name, int *data, int *level, SCI_HFUNCTIONS_ACTION action)
+int action_hashtable_scilab_functions(int *key,char *name, int *data, SCI_HFUNCTIONS_ACTION action)
 {
        int bOK=FAILED;
 
index 7ebd3de..0593386 100644 (file)
@@ -35,5 +35,5 @@ typedef enum
 /*-----------------------------------------------------------------------------------*/
 int    create_hashtable_scilab_functions(unsigned int nel);
 void destroy_hashtable_scilab_functions();
-int action_hashtable_scilab_functions(int *key,char *name, int *data, int *level, SCI_HFUNCTIONS_ACTION action);
+int action_hashtable_scilab_functions(int *key,char *name, int *data, SCI_HFUNCTIONS_ACTION action);
 /*-----------------------------------------------------------------------------------*/
index 070dc29..eae4eed 100644 (file)
@@ -17,7 +17,7 @@ extern int C2F (sciquit)(void);
 extern int C2F(inisci)(int *,int *,int *);
 extern int C2F(scirun)(char *startup,int lstartup);
 extern void sci_usr1_signal(int n);
-extern int sci_exit(int n);
+extern void sci_exit(int n);
 extern int C2F(sciiargc) (void);
 #ifdef _MSC_VER
 extern char *GetExceptionString(DWORD ExceptionCode);
index 9e966ab..7aaabfd 100644 (file)
@@ -46,7 +46,7 @@ static int CloseConsoleGUI(void);
 
 int ExitScilab(void);
 int C2F(sciquit)(void);
-int sci_exit(int n);
+void sci_exit(int n);
 /*-----------------------------------------------------------------------------------*/ 
 static int CloseConsoleGUI(void)
 {
@@ -62,8 +62,6 @@ static int CloseConsoleGUI(void)
 /*-----------------------------------------------------------------------------------*/
 int ExitScilab(void)
 {
-       int i=0;
-               
     if ( Get_no_startup_flag() == 0) 
     {
       char *quit_script =  get_sci_data_strings(5);
@@ -123,7 +121,7 @@ int C2F(sciquit)(void)
        return 0;
 }
 /*-----------------------------------------------------------------------------------*/ 
-int sci_exit(int n) 
+void sci_exit(int n) 
 {
   /* really exit */
   #ifdef sun 
@@ -133,9 +131,7 @@ int sci_exit(int n)
        ieee_flags("clearall","exeption","all", &out);
        }
                #endif 
-       #endif 
-
+  #endif 
   exit(n);
-  return(0);
 }
 /*-----------------------------------------------------------------------------------*/
index 015288b..06f868d 100644 (file)
@@ -73,12 +73,11 @@ void C2F(settmpdir)(void)
                  wsprintf(MsgErr,"Impossible to create : %s",tmp_dir);
                  MessageBox(NULL,MsgErr,"Error",MB_ICONERROR);
                  exit(1);
-                 #endif
-
+                 #else
                  GetTempPath(PATH_MAX,TmpDirDefault);
                  sprintf(tmp_dir,"%s",TmpDirDefault);
                  tmp_dir[strlen(tmp_dir)-1]='\0'; /* Remove last \ */
-
+                 #endif
                }
   }
 #else 
index 62e4331..4cf601f 100644 (file)
@@ -6,6 +6,10 @@
 /*-----------------------------------------------------------------------------------*/ 
 int INXscilab=0;
 /*-----------------------------------------------------------------------------------*/ 
+#if _MSC_VER
+       extern void switch_rlgets (int i);
+#endif
+/*-----------------------------------------------------------------------------------*/ 
 int C2F(xscion) (int *i)
 {
   *i = INXscilab;
@@ -15,7 +19,6 @@ int C2F(xscion) (int *i)
 void SetXsciOn(void)
 {
        #if _MSC_VER
-        extern void switch_rlgets (int i);
         switch_rlgets (1);
        #endif
        INXscilab = 1;
index 17f305d..56ebc8f 100644 (file)
@@ -76,7 +76,7 @@ mget2
 mput2
 ;
 ;differential_equations_f      
-       lsr001_
-  lsa001_
-  ls0001_
+lsr001_
+lsa001_
+ls0001_
   
\ No newline at end of file
index dc527de..584086e 100644 (file)
@@ -127,7 +127,7 @@ int C2F(realtime)(double *t)
   delay = (__int64)(simulation_diff * 10000000) - realtime_diff;
 
   if (delay > 0) 
-       {
+  {
     Sleep((DWORD)(delay/10000));
   }
   return 0;