Re: CalculiX build error using clang

2022-07-26 Thread Mark Brethen
Thanks for the feedback everyone. I also created patches to replace sem_init and sem_destory instances and will be forwarding them to the developer. I didn’t see any warnings or errors but it wouldn’t hurt to give them another look. patch-cgx_2_18-src-cgx_c.diff Description: Binary data

Re: CalculiX build error using clang

2022-07-26 Thread Joshua Root
On 2022-7-27 05:59 , Mark Brethen wrote: Only 1 instance found: src $ sudo ack moveLineEndPoint Password: *cgx.h* *941*:void moveLineEndPoint(int lineNr, int pntNr, double llength); *pickFunktions.c* *4583*:void moveLineEndPoint(int lineNr, int pntNr, double llength) *4800*: moveLineEndPoint(

Re: CalculiX build error using clang

2022-07-26 Thread Chris Jones
> On 26 Jul 2022, at 8:59 pm, Mark Brethen wrote: > >  > Only 1 instance found: > > src $ sudo ack moveLineEndPoint > Password: > cgx.h > 941:void moveLineEndPoint(int lineNr, int pntNr, double llength); > > pickFunktions.c > 4583:void moveLineEndPoint(int lineNr, int pntNr, double llength)

Re: CalculiX build error using clang

2022-07-26 Thread Mark Brethen
Only 1 instance found: src $ sudo ack moveLineEndPoint Password: cgx.h 941:void moveLineEndPoint(int lineNr, int pntNr, double llength); pickFunktions.c 4583:void moveLineEndPoint(int lineNr, int pntNr, double llength) 4800:moveLineEndPoint( lineNr, px, pickbuf); int createLine( char

Re: CalculiX build error using clang

2022-07-26 Thread Chris Jones
> On 26 Jul 2022, at 6:27 pm, Mark Brethen wrote: > > would a ‘return;’ instead of ‘return(-1);’ suffice>? Depends on what the intentions of the developers are here… If callees of the function expect a return value, then the method should instead be updated to declare a return type, and

Re: CalculiX build error using clang

2022-07-26 Thread Joshua Root
On 2022-7-27 02:51 , Christopher Jones wrote: clang is correct in this case, gcc is being sloppy. Basically you cannot return a value, from a function declared as void… fairly basic stuff really.. I believe the standard requires printing a diagnostic message, but not necessarily refusing

Re: CalculiX build error using clang

2022-07-26 Thread Joshua Root
On 2022-7-27 03:42 , Dave Allured - NOAA Affiliate via macports-dev wrote: If you want to be thorough, then search the rest of the code for all references to this function.  Look for any call that checks a return code.  Also see if and how the function is defined for public or external use. 

Re: CalculiX build error using clang

2022-07-26 Thread Dave Allured - NOAA Affiliate via macports-dev
If you want to be thorough, then search the rest of the code for all references to this function. Look for any call that checks a return code. Also see if and how the function is defined for public or external use. If there is any hint of referencing a return code, then declare the return type

Re: CalculiX build error using clang

2022-07-26 Thread Blair Zajac
Yes, that would fix it. > On Jul 26, 2022, at 10:27 AM, Mark Brethen wrote: > > would a ‘return;’ instead of ‘return(-1);’ suffice>? > > Mark Brethen > mark.bret...@gmail.com > > > >> On Jul 26, 2022, at 11:51 AM, Christopher Jones >

Re: CalculiX build error using clang

2022-07-26 Thread Mark Brethen
would a ‘return;’ instead of ‘return(-1);’ suffice>? Mark Brethen mark.bret...@gmail.com > On Jul 26, 2022, at 11:51 AM, Christopher Jones > wrote: > > > clang is correct in this case, gcc is being sloppy. > > Basically you cannot return a value, from a function declared as void… fairly

Re: CalculiX build error using clang

2022-07-26 Thread Christopher Jones
clang is correct in this case, gcc is being sloppy. Basically you cannot return a value, from a function declared as void… fairly basic stuff really.. > On 26 Jul 2022, at 5:34 pm, Mark Brethen wrote: > > I’m seeing this build error when using clang (gcc doesn’t complain): > > info:build

CalculiX build error using clang

2022-07-26 Thread Mark Brethen
I’m seeing this build error when using clang (gcc doesn’t complain): info:build /opt/local/bin/clang-mp-14 -O2 -Wall -Wno-narrowing -I./ -I/opt/local/include -I/opt/local/include/GL -I../../libSNL/src -I../../glut-3.5/src-c -o pickFunktions.o pickFunktions.c :info:build