Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeBSD Clang Build #35

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ cmake ..
make
sudo make install
```
Note: For FreeBSD, use 'gmake'.

Test
----
Expand Down
30 changes: 15 additions & 15 deletions src/Ylib/draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1240,9 +1240,9 @@ char *label ;
} else {
fprintf( stderr,"Color number:%d is out of range", color ) ;
}
return ;
return 0 ;
} else if(!(colorOnS[color])){
return ;
return 0 ;
}
if(!(colorS )){
/* set all lines to black in B&W mode */
Expand All @@ -1252,7 +1252,7 @@ char *label ;
/* but we can avoid an interprocess communication if we do it ourself */
if(!(fullViewS)){
if(!(Yproject_intersect( x1, x2, y1, y2, lS, rS, bS, tS ) )){
return ;
return 0 ;
}
}

Expand Down Expand Up @@ -1297,14 +1297,14 @@ char *label ;
} else {
fprintf( stderr,"Color number:%d is out of range", color ) ;
}
return ;
return 0 ;
} else if(!(colorOnS[color])){
return ;
return 0 ;
}
if(!(fullViewS)){
/* clip if necessary for speed. Avoid interprocess communication */
if(!(Yproject_intersect( x1, x2, y1, y2, lS, rS, bS, tS ) )){
return ;
return 0 ;
}
}

Expand Down Expand Up @@ -1434,9 +1434,9 @@ char *label ;
} else {
fprintf( stderr,"Color number:%d is out of range", color ) ;
}
return ;
return 0 ;
} else if(!(colorOnS[color])){
return ;
return 0 ;
}
points = &(ptS[1]) ;

Expand All @@ -1461,7 +1461,7 @@ char *label ;
if(!(fullViewS)){
/* clip if necessary for speed. Avoid interprocess communication */
if(!(Yproject_intersect( arblS, arbrS, arbbS, arbtS, lS, rS, bS, tS ) )){
return ;
return 0 ;
}
}

Expand Down Expand Up @@ -2167,14 +2167,14 @@ char *label;
INT numw ; /* number written */

if(!(colorOnS[color]) || !dirNameS ){
return ;
return 0 ;
}
/* check modes call draw functions if necessary */
switch( modeS ){
case TWDRAWONLY:
/* this is an error should never call this */
fprintf( stderr,"ERROR[drawWPin]:problem with mode\n" ) ;
return ;
return 0 ;
case TWWRITEONLY:
break ;
case TWWRITENDRAW:
Expand Down Expand Up @@ -2224,14 +2224,14 @@ char *label;
INT numw ; /* number of records written */

if(!(colorOnS[color]) || !dirNameS ){
return ;
return 0 ;
}
/* check modes call draw functions if necessary */
switch( modeS ){
case TWDRAWONLY:
/* this is an error should never call this */
fprintf( stderr,"ERROR[drawWRect]:problem with mode\n" ) ;
return ;
return 0 ;
case TWWRITEONLY:
break ;
case TWWRITENDRAW:
Expand Down Expand Up @@ -2275,14 +2275,14 @@ char *label ;
YBUSTBOXPTR bustptr ;

if(!(colorOnS[color]) || !dirNameS ){
return ;
return 0 ;
}
/* check modes call draw functions if necessary */
switch( modeS ){
case TWDRAWONLY:
/* this is an error should never call this */
fprintf( stderr,"ERROR[drawWArb]:problem with mode\n" ) ;
return ;
return 0 ;
case TWWRITEONLY:
break ;
case TWWRITENDRAW:
Expand Down
8 changes: 4 additions & 4 deletions src/Ylib/graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,7 @@ VOID Ygraph_bfs(graph,sourceNode,targetNode)

if ( !sourceNode ) {
M( ERRMSG, "Ygraph_bfs","BFS cannot start from a null node\n" ) ;
return;
return 0;
}

/* create a heap */
Expand Down Expand Up @@ -2555,18 +2555,18 @@ VOID Ygraph_steinerImprove(graph,steinerGraph,maxIterations)

if ( ! Ygraph_nodeCount(steinerGraph) ) {
M(ERRMSG,routineNameS,"aborting: steiner graph has no nodes\n");
return;
return 0;
}

if ( ! Ygraph_edgeCount(steinerGraph) ) {
M(ERRMSG,routineNameS,"aborting: steiner graph has no edges\n");
return;
return 0;
}

if ( Ygraph_nodeCount(steinerGraph) < 3 ||
Ygraph_edgeCount(steinerGraph) < 2 ) {
Ygraph_edgeWeights2Size(steinerGraph);
return;
return 0;
}

pathTree = Yrbtree_init(compare_edge);
Expand Down
8 changes: 4 additions & 4 deletions src/Ylib/okmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -892,14 +892,14 @@ VOID Ysafe_free(ptr)
VOIDPTR ptr;
{
free(ptr);
return;
return 0;
}

VOID Ysafe_cfree(ptr)
VOIDPTR ptr;
{
free(ptr);
return;
return 0;
}

/* ***********DUMMY ROUTINES TO RESOLVE GLOBALS **************** */
Expand Down Expand Up @@ -930,7 +930,7 @@ char *offsetPtr ; /* pointer to "next" field within structure */
VOID YdebugMemory( flag )
INT flag ;
{
return ;
return 0 ;
}

INT YcheckDebug( where )
Expand All @@ -942,7 +942,7 @@ VOIDPTR where ;
VOID Yinit_memsize( memsize )
INT memsize ;
{
return ;
return 0 ;
} /* end Yinit_memsize */

VOID Ydump_mem()
Expand Down
4 changes: 2 additions & 2 deletions src/Ylib/quicksort.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ VOID Yquicksort(base, n, size, compare )
char *min, *max;

if (n <= 1)
return;
return 0;
compare_fun = compare ;
qsz = size;
thresh = qsz * THRESH;
Expand Down Expand Up @@ -97,7 +97,7 @@ VOID Yquicksort(base, n, size, compare )
}
}

if (n == 2) return;
if (n == 2) return 0;

/*
* With our sentinel in place, we now run the following hyper-fast
Expand Down
2 changes: 1 addition & 1 deletion src/Ylib/rbtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ VOIDPTR data ;

if(!(data)){
M( ERRMSG, "Yrbtree_insert","No data given\n" ) ;
return ;
return 0 ;
}

/* first perform an normal insertion into the binary tree */
Expand Down
6 changes: 3 additions & 3 deletions src/Ylib/yreadpar.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,18 +371,18 @@ BOOL abortFlag ;
}
} else {
M( ERRMSG, "Yreadpar_init", "Unknown parameter file\n" ) ;
return ;
return 0 ;
} /* end switch on program */

/* now that we have the file name open the par file */
if(fpS){
M( ERRMSG, "Yreadpar_init",
"Only one par file may be read at the same time\n" ) ;
return ;
return 0 ;
}
fpS = TWOPEN( filename, "r", abortFlag ) ;
if(!(fpS) ){
return ;
return 0 ;
}
lineS = 0 ;
rule_section = FALSE ;
Expand Down
2 changes: 1 addition & 1 deletion src/genrows/draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,7 @@ process_graphics()
shortRowG = FALSE ;
remakerows() ;
draw_the_data() ;
if (last_chanceG) (VOID)last_chance() ;
if (last_chanceG) last_chance() ;

}

Expand Down
2 changes: 1 addition & 1 deletion src/twsc/graphics.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ INT cell ;
y = cptr->cycenter ;
if( y == GATE_ARRAY_MAGIC_CONSTANT ){
/* don't draw these */
return ;
return 0 ;
}
/* name the cell */
/* draw cell labels if requested */
Expand Down