Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb549924

Browse files
author
Bryan Henderson
committed
Quiet compiler warnings.
1 parent17befd6 commitb549924

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

‎src/test/regress/regress.c

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
/*
2-
* $Header: /cvsroot/pgsql/src/test/regress/regress.c,v 1.2 1996/11/11 16:33:12 scrappy Exp $
2+
* $Header: /cvsroot/pgsql/src/test/regress/regress.c,v 1.3 1996/11/12 11:09:13 bryanh Exp $
33
*/
44

55
#include<float.h>/* faked on sunos */
66
#include<stdio.h>
7+
#include<string.h>/* for memset() */
78

89
#include<postgres.h>
10+
#include"libpq-fe.h"
911

1012
#include"utils/geo-decls.h"/* includes <math.h> */
11-
#include"libpq-fe.h"
13+
#include"executor/executor.h"/* For GetAttributeByName */
1214

1315
#defineP_MAXDIG 12
1416
#defineLDELIM'('
@@ -129,21 +131,21 @@ interpt_pp(p1,p2)
129131
inti,j;
130132
LSEGseg1,seg2;
131133
LINE*ln;
134+
boolfound;/* We've found the intersection */
132135

133-
for (i=0;i<p1->npts-1;i++)
134-
for (j=0;j<p2->npts-1;j++)
136+
found= false;/* Haven't found it yet */
137+
138+
for (i=0;i<p1->npts-1&& !found;i++)
139+
for (j=0;j<p2->npts-1&& !found;j++)
135140
{
136-
regress_lseg_construct(&seg1,&p1->p[i],&p1->p[i+1]);
137-
regress_lseg_construct(&seg2,&p2->p[j],&p2->p[j+1]);
138-
if (lseg_intersect(&seg1,&seg2))
139-
{
140-
ln=line_construct_pp(&seg2.p[0],&seg2.p[1]);
141-
retval=interpt_sl(&seg1,ln);
142-
gotoexit;
143-
}
141+
regress_lseg_construct(&seg1,&p1->p[i],&p1->p[i+1]);
142+
regress_lseg_construct(&seg2,&p2->p[j],&p2->p[j+1]);
143+
if (lseg_intersect(&seg1,&seg2))found= true;
144144
}
145145

146-
exit:
146+
ln=line_construct_pp(&seg2.p[0],&seg2.p[1]);
147+
retval=interpt_sl(&seg1,ln);
148+
147149
return(retval);
148150
}
149151

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp