]> OCCT Git - occt-copy.git/commitdiff
Fixed casting pointer to int error.
authorIgor Khozhanov <i.khozhanov@mail.ru>
Mon, 11 May 2020 18:27:50 +0000 (21:27 +0300)
committerika <ika@opencascade.com>
Mon, 24 Aug 2020 12:00:55 +0000 (15:00 +0300)
Fixed /**/ comment inside comment warnings.
Fixed converting string constant to 'char*' warning.

src/ExpToCasExe/expparse.cxx
src/ExpToCasExe/expscan.cxx
src/ExpToCasExe/exptocas.l

index fb8af94d49b2629f44b3318303659aac3b8f9258..fc7b1f3a87ed93ca2d2aebbb342484d6b00af6d3 100644 (file)
@@ -373,7 +373,7 @@ int main ( void )
     printf ( "\nTotal %d", num );
   }
 
-/*  tlistfree ( yylval.tlist ); * /
+//  tlistfree ( yylval.tlist );
   return num;
 }
 */
index 3f570a41a77dbc380c2c6f20d8f8d9d56af7f832..a6cbd11aa95a60e3a9a02f8a84f259e63b57f329 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <cstdint>
 
 #if defined(__clang__)
 #pragma GCC diagnostic ignored "-Wmissing-braces"
@@ -2771,7 +2772,7 @@ yylook()
                                }
 # endif
                        yyr = yyt;
-                       if ( (int)yyt > (int)yycrank){
+                       if ( (intptr_t)yyt > (intptr_t)yycrank){
                                yyt = yyr + yych;
                                if (yyt <= yytop && yyt->verify+yysvec == yystate){
                                        if(yyt->advance+yysvec == YYLERR)       /* error transitions */
@@ -2785,7 +2786,7 @@ yylook()
                                        }
                                }
 # ifdef YYOPTIM
-                       else if((int)yyt < (int)yycrank) {              /* r < yycrank */
+                       else if((intptr_t)yyt < (intptr_t)yycrank) {            /* r < yycrank */
                                yyt = yyr = yycrank+(yycrank-yyt);
 # ifdef LEXDEBUG
                                if(debug)fprintf(yyout,"compressed state\n");
index 00bcc4e50d3e197a5ddc2a91a376202c3b99773d..06daf7cbda693810de01e6e3c83295f6a400a822 100644 (file)
@@ -62,7 +62,7 @@ int ec_curline ( void )
   return ec_linenum;
 }
 
-int ec_error ( char *s, char *text )
+int ec_error ( char const *s, char const *text )
 {
   printf ( "\nError at line %d: %s \"%s\"\n", ec_curline(), s, text );
   return 0;