diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-05-27 12:02:41 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-05-27 12:02:41 (GMT) |
commit | 6a43889bd93ef12910627c501dbf335e73750149 (patch) | |
tree | 21939f657d2769f5732e5e7741c4aa4d1cfd5dcd | |
parent | 214b73439bb1c0e97ed318ba50933bbf0bc0b1cb (diff) | |
download | tk-6a43889bd93ef12910627c501dbf335e73750149.zip tk-6a43889bd93ef12910627c501dbf335e73750149.tar.gz tk-6a43889bd93ef12910627c501dbf335e73750149.tar.bz2 |
Fix parameter mismatch between functions definitions and implementation. This gives a warning with Gcc 11
-rw-r--r-- | generic/tkTrig.c | 16 | ||||
-rw-r--r-- | unix/tkUnixFont.c | 4 |
2 files changed, 10 insertions, 10 deletions
diff --git a/generic/tkTrig.c b/generic/tkTrig.c index 101f09b..2e11db0 100644 --- a/generic/tkTrig.c +++ b/generic/tkTrig.c @@ -39,9 +39,9 @@ double TkLineToPoint( - double end1Ptr[2], /* Coordinates of first end-point of line. */ - double end2Ptr[2], /* Coordinates of second end-point of line. */ - double pointPtr[2]) /* Points to coords for point. */ + double end1Ptr[], /* Coordinates of first end-point of line. */ + double end2Ptr[], /* Coordinates of second end-point of line. */ + double pointPtr[]) /* Points to coords for point. */ { double x, y; @@ -143,11 +143,11 @@ TkLineToPoint( int TkLineToArea( - double end1Ptr[2], /* X and y coordinates for one endpoint of + double end1Ptr[], /* X and y coordinates for one endpoint of * line. */ - double end2Ptr[2], /* X and y coordinates for other endpoint of + double end2Ptr[], /* X and y coordinates for other endpoint of * line. */ - double rectPtr[4]) /* Points to coords for rectangle, in the + double rectPtr[]) /* Points to coords for rectangle, in the * order x1, y1, x2, y2. X1 must be no larger * than x2, and y1 no larger than y2. */ { @@ -655,14 +655,14 @@ TkPolygonToArea( /* ARGSUSED */ double TkOvalToPoint( - double ovalPtr[4], /* Pointer to array of four coordinates (x1, + double ovalPtr[], /* Pointer to array of four coordinates (x1, * y1, x2, y2) defining oval's bounding * box. */ double width, /* Width of outline for oval. */ int filled, /* Non-zero means oval should be treated as * filled; zero means only consider * outline. */ - double pointPtr[2]) /* Coordinates of point. */ + double pointPtr[]) /* Coordinates of point. */ { double xDelta, yDelta, scaledDistance, distToOutline, distToCenter; double xDiam, yDiam; diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c index bd83a5e..665b260 100644 --- a/unix/tkUnixFont.c +++ b/unix/tkUnixFont.c @@ -2763,9 +2763,9 @@ GetScreenFont( FontAttributes *wantPtr, /* Contains desired actual pixel-size if the * best font was scalable. */ char **nameList, /* Array of XLFDs. */ - int bestIdx[2], /* Indices into above array for XLFD of best + int bestIdx[], /* Indices into above array for XLFD of best * bitmapped and best scalable font. */ - unsigned bestScore[2]) /* Scores of best bitmapped and best scalable + unsigned bestScore[]) /* Scores of best bitmapped and best scalable * font. XLFD corresponding to lowest score * will be constructed. */ { |