Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stb_herringbone_wang_tile.h:369:41: warning: ‘struct stbhw__process’ declared inside parameter list will not be visible outside of this definition or declaration #1670

Open
yangfl opened this issue Jul 27, 2024 · 0 comments

Comments

@yangfl
Copy link
Contributor

yangfl commented Jul 27, 2024

Describe the bug

stb_herringbone_wang_tile.h:369:41: warning: ‘struct stbhw__process’ declared inside parameter list will not be visible outside of this definition or declaration
  369 | typedef void stbhw__process_rect(struct stbhw__process *p, int xpos, int ypos,
      |                                         ^~~~~~~~~~~~~~
stb_herringbone_wang_tile.h: In function ‘stbhw__process_h_row’:
stb_herringbone_wang_tile.h:401:43: error: passing argument 1 of ‘p->process_h_rect’ from incompatible pointer type [-Wincompatible-pointer-types]
  401 |                         p->process_h_rect(p, xpos, ypos, a,b,c,d,e,f);
      |                                           ^
      |                                           |
      |                                           stbhw__process *
stb_herringbone_wang_tile.h:401:43: note: expected ‘struct stbhw__process *’ but argument is of type ‘stbhw__process *’
stb_herringbone_wang_tile.h: In function ‘stbhw__process_v_row’:
stb_herringbone_wang_tile.h:425:43: error: passing argument 1 of ‘p->process_v_rect’ from incompatible pointer type [-Wincompatible-pointer-types]
  425 |                         p->process_v_rect(p, xpos, ypos, a,b,c,d,e,f);
      |                                           ^
      |                                           |
      |                                           stbhw__process *
(more to follow)

To Reproduce
Steps to reproduce the behavior:
Use GCC 14 on Debian sid to build stb_herringbone_wang_tile.h.

Expected behavior
Forward declare struct stbhw__process before stbhw__process_rect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@yangfl @nothings and others