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

Commitab87b8f

Browse files
committed
Mark variable used only in assertion with PG_USED_FOR_ASSERTS_ONLY
Perpendicular lines always intersect, so the line_interpt_line() returnvalue in line_closept_point() was used only in an assertion, triggeringcompiler warnings in non-assert builds.
1 parent74294c7 commitab87b8f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/backend/utils/adt/geo_ops.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2528,14 +2528,15 @@ lseg_interpt_line(Point *result, LSEG *lseg, LINE *line)
25282528
staticfloat8
25292529
line_closept_point(Point*result,LINE*line,Point*point)
25302530
{
2531-
boolretval;
2531+
boolretvalPG_USED_FOR_ASSERTS_ONLY;
25322532
Pointclosept;
25332533
LINEtmp;
25342534

25352535
/* We drop a perpendicular to find the intersection point. */
25362536
line_construct(&tmp,point,line_invsl(line));
25372537
retval=line_interpt_line(&closept,line,&tmp);
2538-
Assert(retval);/* XXX: We need something better. */
2538+
2539+
Assert(retval);/* perpendicular lines always intersect */
25392540

25402541
if (result!=NULL)
25412542
*result=closept;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp