mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-02 15:53:26 +02:00
Quiet compiler warnings.
This commit is contained in:
parent
17befd6c69
commit
b5499249e5
@ -1,14 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
* $Header: /cvsroot/pgsql/src/test/regress/regress.c,v 1.2 1996/11/11 16:33:12 scrappy Exp $
|
* $Header: /cvsroot/pgsql/src/test/regress/regress.c,v 1.3 1996/11/12 11:09:13 bryanh Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <float.h> /* faked on sunos */
|
#include <float.h> /* faked on sunos */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h> /* for memset() */
|
||||||
|
|
||||||
#include <postgres.h>
|
#include <postgres.h>
|
||||||
|
#include "libpq-fe.h"
|
||||||
|
|
||||||
#include "utils/geo-decls.h" /* includes <math.h> */
|
#include "utils/geo-decls.h" /* includes <math.h> */
|
||||||
#include "libpq-fe.h"
|
#include "executor/executor.h" /* For GetAttributeByName */
|
||||||
|
|
||||||
#define P_MAXDIG 12
|
#define P_MAXDIG 12
|
||||||
#define LDELIM '('
|
#define LDELIM '('
|
||||||
@ -129,21 +131,21 @@ interpt_pp(p1,p2)
|
|||||||
int i,j;
|
int i,j;
|
||||||
LSEG seg1, seg2;
|
LSEG seg1, seg2;
|
||||||
LINE *ln;
|
LINE *ln;
|
||||||
|
bool found; /* We've found the intersection */
|
||||||
|
|
||||||
for (i = 0; i < p1->npts - 1; i++)
|
found = false; /* Haven't found it yet */
|
||||||
for (j = 0; j < p2->npts - 1; j++)
|
|
||||||
|
for (i = 0; i < p1->npts - 1 && !found; i++)
|
||||||
|
for (j = 0; j < p2->npts - 1 && !found; j++)
|
||||||
{
|
{
|
||||||
regress_lseg_construct(&seg1, &p1->p[i], &p1->p[i+1]);
|
regress_lseg_construct(&seg1, &p1->p[i], &p1->p[i+1]);
|
||||||
regress_lseg_construct(&seg2, &p2->p[j], &p2->p[j+1]);
|
regress_lseg_construct(&seg2, &p2->p[j], &p2->p[j+1]);
|
||||||
if (lseg_intersect(&seg1, &seg2))
|
if (lseg_intersect(&seg1, &seg2)) found = true;
|
||||||
{
|
|
||||||
ln = line_construct_pp(&seg2.p[0], &seg2.p[1]);
|
|
||||||
retval = interpt_sl(&seg1, ln);
|
|
||||||
goto exit;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exit:
|
ln = line_construct_pp(&seg2.p[0], &seg2.p[1]);
|
||||||
|
retval = interpt_sl(&seg1, ln);
|
||||||
|
|
||||||
return(retval);
|
return(retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user