mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0023934: Compiler warnings in MS VC++ 10
Elimination of compiler warnings - ExprIntrp: generated file ExprIntrp.tab.c and related WOK scripts removed from the sources - ExprIntrp, StepFile: added missing declarations and casts; warnings caused by Flex and Bison code suppressed for MSVC compuler by #pragma - OSD: dummy #includes added to files containing no code for Windows, to avoid warning on empty file - PLib: piece of code contained in PLib_ChangeDim.gxx included explicitly in cxx and cleaned - Other places: some casts added to avoid warnings
This commit is contained in:
@@ -93,9 +93,11 @@ void rec_settext(char* s)
|
||||
char* rec_newtext(char* r)
|
||||
/* routine utilitaire creant une chaine dynamique a partir d'un char[] */
|
||||
{
|
||||
char* savrestext; char* s0;
|
||||
char* savrestext;
|
||||
char* s0;
|
||||
savrestext = restext;
|
||||
rec_restext(r,strlen(r)); s0 = restext;
|
||||
rec_restext(r,(int)strlen(r));
|
||||
s0 = restext;
|
||||
restext = savrestext;
|
||||
return (s0);
|
||||
}
|
||||
@@ -396,7 +398,9 @@ void rec_print(struct rec* unrec)
|
||||
if (modeprint < 2) return ;
|
||||
curarg = unrec->first ;
|
||||
while (curarg != NULL) {
|
||||
numa ++; argl = strlen(curarg->val) + 18; numl += argl;
|
||||
numa ++;
|
||||
argl = (int)strlen(curarg->val) + 18;
|
||||
numl += argl;
|
||||
if (numl > 132) { printf("\n"); numl = argl; }
|
||||
printf (" - Arg.%d[%c%c] : %s",
|
||||
numa,argtype1[curarg->type],argtype2[curarg->type],curarg->val);
|
||||
|
@@ -45,6 +45,11 @@ void rec_typarg(int argtype);
|
||||
void resultat () /* Resultat alloue dynamiquement, "jete" une fois lu */
|
||||
{ if (modcom == 0) rec_restext(yytext,yyleng); }
|
||||
|
||||
// disable MSVC warnings in flex code
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4131 4244 4273 4267 4127)
|
||||
#endif
|
||||
|
||||
%}
|
||||
%%
|
||||
" " {;}
|
||||
|
@@ -54,6 +54,12 @@
|
||||
#define alloca malloc
|
||||
#endif
|
||||
|
||||
|
||||
// disable MSVC warnings in flex code
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4244 4131)
|
||||
#endif
|
||||
|
||||
%}
|
||||
%%
|
||||
/* N.B. : les commentaires sont filtres par LEX */
|
||||
|
Reference in New Issue
Block a user