Changeset a2fa63f in tol


Ignore:
Timestamp:
Aug 4, 2015, 11:00:39 AM (11 years ago)
Author:
Jorge Pérez <josp.jorge@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
da4a80a7
Parents:
6605c6c
Message:

refs #1866, limpieza de warnings reportados por -Wall

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@6809 be4846ae-f051-483a-831f-b64e7d08527f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol/init.cpp

    r6605c6c ra2fa63f  
    184184
    185185//--------------------------------------------------------------------
    186   static void Error_UnexpectedTolEnd(void)
    187 //--------------------------------------------------------------------
    188 {
    189   Error(I2("An unexpected error has made TOL unstable and session must be closed",
    190            "Un error inesperado ha hecho TOL inestable y la sesión debe ser cerrada"));
    191 }
    192 
    193 //--------------------------------------------------------------------
    194   TOL_API void UnexpectedTolEnd(void)
    195 //--------------------------------------------------------------------
    196 {
    197   Error_UnexpectedTolEnd();
    198   SetTOLEnd();
    199 }
    200 
    201 //--------------------------------------------------------------------
    202 static void signal_error_SIGABRT(int sig)
    203 //--------------------------------------------------------------------
    204 {
    205   Error("SIGNAL: Abnormal termination, such as instigated by the abort function. (Abort.)");
    206   Error_UnexpectedTolEnd();
    207   exit(sig);
    208 };
    209 
    210 //--------------------------------------------------------------------
    211 static void signal_error_SIGFPE(int sig)
    212 //--------------------------------------------------------------------
    213 {
    214   Error("SIGNAL: Erroneous arithmetic operation, such as divide by 0 or overflow. (Floating point exception.)");
    215   Error_UnexpectedTolEnd();
    216   exit(sig);
    217 };
    218 
    219 //--------------------------------------------------------------------
    220 static void signal_error_SIGILL(int sig)
    221 //--------------------------------------------------------------------
    222 {
    223   Error("SIGNAL: An ‘invalid object program’ has been detected. This usually means that there is an illegal instruction in the program. (Illegal instruction.)");
    224   Error_UnexpectedTolEnd();
    225   exit(sig);
    226 };
    227 
    228 //--------------------------------------------------------------------
    229186static void signal_error_SIGINT(int sig)
    230187//--------------------------------------------------------------------
    … …  
    245202    time( tm0 );
    246203  }
     204}
     205
     206#if !defined(UNIX)
     207
     208//--------------------------------------------------------------------
     209  static void Error_UnexpectedTolEnd(void)
     210//--------------------------------------------------------------------
     211{
     212  Error(I2("An unexpected error has made TOL unstable and session must be closed",
     213           "Un error inesperado ha hecho TOL inestable y la sesión debe ser cerrada"));
     214}
     215
     216//--------------------------------------------------------------------
     217  TOL_API void UnexpectedTolEnd(void)
     218//--------------------------------------------------------------------
     219{
     220  Error_UnexpectedTolEnd();
     221  SetTOLEnd();
     222}
     223
     224//--------------------------------------------------------------------
     225static void signal_error_SIGABRT(int sig)
     226//--------------------------------------------------------------------
     227{
     228  Error("SIGNAL: Abnormal termination, such as instigated by the abort function. (Abort.)");
     229  Error_UnexpectedTolEnd();
     230  exit(sig);
     231};
     232
     233//--------------------------------------------------------------------
     234static void signal_error_SIGFPE(int sig)
     235//--------------------------------------------------------------------
     236{
     237  Error("SIGNAL: Erroneous arithmetic operation, such as divide by 0 or overflow. (Floating point exception.)");
     238  Error_UnexpectedTolEnd();
     239  exit(sig);
     240};
     241
     242//--------------------------------------------------------------------
     243static void signal_error_SIGILL(int sig)
     244//--------------------------------------------------------------------
     245{
     246  Error("SIGNAL: An ‘invalid object program’ has been detected. This usually means that there is an illegal instruction in the program. (Illegal instruction.)");
     247  Error_UnexpectedTolEnd();
     248  exit(sig);
    247249};
    248250
    … …  
    281283  exit(sig);
    282284};
     285
     286#endif
    283287
    284288//--------------------------------------------------------------------
    … …  
    323327//signal(      19, signal_error_SIGUNK);
    324328//signal(      20, signal_error_SIGUNK);
    325 /* */
     329 */
    326330#endif
    327331}
    … …  
    934938#endif
    935939    BText svnInfo = __TOL_BUILD_SVN_INFO__;
    936     BSystemText* SvnInfo_ = new BSystemText
     940    new BSystemText
    937941          ("SvnInfo", svnInfo,
    938942           I2("Contains the information on the SVN URL and revision number from which TOL was compiled",
    … …  
    959963  int blnk_pos_2 = _tolVersion_.Find(' ', blnk_pos_1+1);
    960964
    961   BSystemText* TolReleaseId_ = new BSystemText("TolReleaseId",
    962   BText(_tolVersion_,0,blnk_pos_2-1),
    963   I2("Time Oriented Language release identifier.",
    964      "Identificador de la publicación de la versión Time Oriented Language."));
    965 
    966   BSystemText* TolVersionId_ = new BSystemText("TolVersionId",
    967   BText(_tolVersion_,0,blnk_pos_1-1),
    968   I2("Time Oriented Language version identifier.",
    969      "Identificador de la versión Time Oriented Language."));
     965  new BSystemText("TolReleaseId",
     966                  BText(_tolVersion_,0,blnk_pos_2-1),
     967                  I2("Time Oriented Language release identifier.",
     968                     "Identificador de la publicación de la versión Time Oriented Language."));
     969
     970  new BSystemText("TolVersionId",
     971                  BText(_tolVersion_,0,blnk_pos_1-1),
     972                  I2("Time Oriented Language version identifier.",
     973                     "Identificador de la versión Time Oriented Language."));
    970974
    971975  BText TOLAppName = ToLower(GetFilePrefix(_tolSessionPath_));
    972   BSystemText* TOLAppName_ = new BSystemText("TOLAppName",
    973   TOLAppName,
    974   I2("The name of the TOL executable",
    975      "Nombre del ejecutable TOL."));
     976  new BSystemText("TOLAppName",
     977                  TOLAppName,
     978                  I2("The name of the TOL executable",
     979                     "Nombre del ejecutable TOL."));
    976980
    977981  BText TOLSH_PATH = BSys::GetEnv("TOLSH_PATH");
    … …  
    980984    TOLSH_PATH = GetFilePath(_tolSessionPath_);
    981985  }
    982   BSystemText* TOLSH_PATH_  = new BSystemText("TOLSH_PATH",
    983   TOLSH_PATH,
    984   I2("The path of the TOL executable",
    985      "Ubicación del ejecutable TOL."));
     986  new BSystemText("TOLSH_PATH",
     987                  TOLSH_PATH,
     988                  I2("The path of the TOL executable",
     989                     "Ubicación del ejecutable TOL."));
    986990
    987991  #ifdef UNIX
    … …  
    10011005  InitRefStructs();
    10021006
    1003   BStruct* strStructFieldInfo_  = NewStruct("@StructFieldInfo",
    1004     "Text:Type,"
    1005     "Text:Name,"
    1006     "Text:Description");
     1007  NewStruct("@StructFieldInfo",
     1008            "Text:Type,"
     1009            "Text:Name,"
     1010            "Text:Description");
    10071011
    10081012  TOLHasBeenInitialized_ = true;
    … …  
    15591563//--------------------------------------------------------------------
    15601564{
    1561   int aliveObjects_1  = 0, aliveObjects_2  = 0;
    1562   int aliveObjects_1_ = 0, aliveObjects_2_ = 0; 
     1565  //  unused
     1566  int /*aliveObjects_1  = 0,*/ aliveObjects_2  = 0;
     1567  //  unused
     1568  int /*aliveObjects_1_ = 0,*/ aliveObjects_2_ = 0; 
    15631569  InitVerboseMode();
    15641570  BText::PutFormatBReal("%lf");
    … …  
    17271733  {
    17281734    InitGrammars(argv[0]);
    1729     aliveObjects_1 = AliveObjects();
     1735    // unused
     1736    /*aliveObjects_1 =*/ AliveObjects();
    17301737    if(initTOL) { LoadInitLibrary(loadInitProject,loadDefaultPackages); }
    17311738    aliveObjects_2 = AliveObjects();
Note: See TracChangeset for help on using the changeset viewer.