Skip to content

Fix compiler warnings#13

Merged
tidwall merged 1 commit intotidwall:mainfrom
abeggc:bugfix/compiler-warnings
Apr 30, 2025
Merged

Fix compiler warnings#13
tidwall merged 1 commit intotidwall:mainfrom
abeggc:bugfix/compiler-warnings

Conversation

@abeggc
Copy link
Copy Markdown
Contributor

@abeggc abeggc commented Apr 29, 2025

Please do not open a pull request without first filing an issue and/or discussing the feature directly with me.

Please ensure you adhere to every item in this list

  • This PR was pre-approved by the project maintainer
  • I have self-reviewed the code
  • I have added all necessary tests

Describe your changes

When using tg.c as TG_STATIC, there are two warnings: from a declared function which isn't implemented and an extra argument in the documentation.

Function with only a prototype (when compiled with gcc -Wall -Werror): tg.c:406:16: warning: 'tg_poly_coveredby_poly' declared 'static' but never defined [-Wunused-function]
406 | TG_EXTERN bool tg_poly_coveredby_poly(const struct tg_poly *a,
| ^~~~~~~~~~~~~~~~~~~~~~

Documentation with an extra argument (when compiled with clang -Wall -Wdocumentation -Werror):
tg.c:15451:12: warning: parameter 'ix' not found in the function declaration [-Wdocumentation]
15451 | /// @param ix Indexing option, e.g. TG_NONE, TG_NATURAL, TG_YSTRIPES
| ^~

Issue number and link

See issue #11

When using tg.c as TG_STATIC, there are two warnings: from a declared function
which isn't implemented and an extra argument in the documentation.

Function with only a prototype (when compiled with `gcc -Wall -Werror`):
tg.c:406:16: warning: 'tg_poly_coveredby_poly' declared 'static' but never defined [-Wunused-function]
  406 | TG_EXTERN bool tg_poly_coveredby_poly(const struct tg_poly *a,
      |                ^~~~~~~~~~~~~~~~~~~~~~

Documentation with an extra argument (when compiled with clang -Wall
-Wdocumentation -Werror):
tg.c:15451:12: warning: parameter 'ix' not found in the function declaration [-Wdocumentation]
 15451 | /// @param ix Indexing option, e.g. TG_NONE, TG_NATURAL, TG_YSTRIPES
       |            ^~
@tidwall tidwall merged commit aa16911 into tidwall:main Apr 30, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants