For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

code error detected bye openSUSE BuildService

Andrea's picture

hi, the openSUSE buildservice stop suse Factory rpm publishing because of that:

I: Expression compares a char* pointer with a string literal.
Usually a strcmp() was intended by the programmer
E: OpenCASCADE stringcompare ../../../src/TestTopOpeDraw/TestTopOpeDraw_OtherCommands.cxx: 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115

any ideas how can i fix it?

thanks
Andrea

Denis Barbier's picture

In lines 101-115 of ros/src/TestTopOpeDraw/TestTopOpeDraw_OtherCommands.cxx,
all occurrences of
if(a[iloc+1] == "colorName")
have to be replaced by
if(strcmp(a[iloc+1], "colorName") == 0)
Alternatively you can add --disable-draw configure flag to not build DRAWEXE.

Are those build logs publically available?

Andrea's picture

you need to register, but yes is publically available:

go there:

https://build.opensuse.org/package/show?package=OpenCascade&project=home%3Aanubisg1

and click on "build-log" f the suse version you whant to see (both i586 and x86_64)

Denis Barbier's picture

Waow, that's great, thanks for the hint!

Andrea's picture

hi, the error i wrote has been fixed, but i receive that one now:

I: Program is using implicit definitions of special functions.
these functions need to use their correct prototypes to allow
the lightweight buffer overflow checking to work.
- Implicit memory/string functions need #include .
- Implicit *printf functions need #include .
- Implicit *printf functions need #include .
- Implicit *read* functions need #include .
- Implicit *recv* functions need #include .
E: OpenCASCADE implicit-fortify-decl ../../../drv/ExprIntrp/lex.ExprIntrp.c: 2618

where have i to exactly add that?

#include
#include
#include
#include

?? thanks

Denis Barbier's picture

It looks like a false positive, ExprIntrp is seen as a special function because it contains
'print' characters ;-)
Here is a patch. After applying this patch, run these commands:

cd ros/src/ExprIntrp
bison -d -p ExprIntrp -o ExprIntrp.tab.c ExprIntrp.yacc
flex -L -8 -Cf -Cr -P ExprIntrp -o lex.ExprIntrp.c ExprIntrp.lex
mv ExprIntrp.tab.h ../../inc/
cp ExprIntrp.tab.c lex.ExprIntrp.c ../../drv/ExprIntrp/

I tried to reproduce the same options originally used, maybe there are better ways.

--- opencascade.orig/ros/src/ExprIntrp/ExprIntrp.yacc
+++ opencascade/ros/src/ExprIntrp/ExprIntrp.yacc
@@ -42,6 +42,10 @@
extern void ExprIntrp_VariableIdentifier();
extern void ExprIntrp_Productor();
extern void ExprIntrp_EndOfEqual();
+
+int yylex(void);
+void yyerror(char const *s);
+
%}

%token SUMOP MINUSOP DIVIDEOP EXPOP MULTOP PARENTHESIS BRACKET ENDPARENTHESIS ENDBRACKET VALUE IDENTIFIER COMMA DIFFERENTIAL DERIVATE DERIVKEY ASSIGNOP DEASSIGNKEY EQUALOP RELSEPARATOR CONSTKEY SUMKEY PRODKEY

Other implicit declarations are fixed by the following patch:

Index: opencascade/ros/src/OpenGl/OpenGl_tXfm.c
===================================================================
--- opencascade.orig/ros/src/OpenGl/OpenGl_tXfm.c
+++ opencascade/ros/src/OpenGl/OpenGl_tXfm.c
@@ -64,6 +64,7 @@
#include

#include
+#include

#include
#include
@@ -79,6 +80,7 @@
#include
#include
#include
+#include
/*----------------------------------------------------------------------*/
/*
* Constantes
Index: opencascade/ros/src/OpenGl/OpenGl_telem_util.h
===================================================================
--- opencascade.orig/ros/src/OpenGl/OpenGl_telem_util.h
+++ opencascade/ros/src/OpenGl/OpenGl_telem_util.h
@@ -155,6 +155,9 @@
Tfloat *xr, Tfloat *yr);
extern TStatus TelUnProjectionRaster( Tint ws, Tint xr, Tint yr,
Tfloat *x, Tfloat *y, Tfloat *z);
+extern TStatus TelUnProjectionRasterWithRay( Tint ws, Tint xr, Tint yr,
+ Tfloat *x, Tfloat *y, Tfloat *z,
+ Tfloat *dx, Tfloat *dy, Tfloat *dz)
extern Tint TelBackBufferRestored(void);
extern void TelSetBackBufferRestored( Tint );
extern void TelEnable( Tint );

Andrea's picture

thanks a lot... once buildservice will be back online ( http://news.opensuse.org/2008/10/10/power-outage-in-area-where-most-opensuse-servers-are-located/ ) i'll test and report if any other error will be reported (hope not)

Andrea's picture

no other errors detected, thanks a lot