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

Cast SNDBUF to UBYTE on callback to fix gcc-14.1 compile #95

Closed
wants to merge 1 commit into from

Conversation

heitbaum
Copy link

Fixes gcc-14,1 error

libretro/core-mapper.c: In function 'retro_sound_update': libretro/core-mapper.c:158:22: error: passing argument 1 of 'Sound_Callback' from incompatible pointer type [-Wincompatible-pointer-types]
158 | Sound_Callback(SNDBUF, 102422);
| ^~~~~~
| |
| short int *
In file included from ./atari800/src/platform.h:11,
from libretro/core-mapper.c:4:
./atari800/src/sound.h:75:28: note: expected 'unsigned char *' but argument is of type 'short int *'
75 | void Sound_Callback(UBYTE *buffer, unsigned int size);

Fixes gcc-14,1 error

libretro/core-mapper.c: In function 'retro_sound_update':
libretro/core-mapper.c:158:22: error: passing argument 1 of 'Sound_Callback' from incompatible pointer type [-Wincompatible-pointer-types]
  158 |       Sound_Callback(SNDBUF, 1024*2*2);
      |                      ^~~~~~
      |                      |
      |                      short int *
In file included from ./atari800/src/platform.h:11,
                 from libretro/core-mapper.c:4:
./atari800/src/sound.h:75:28: note: expected 'unsigned char *' but argument is of type 'short int *'
   75 | void Sound_Callback(UBYTE *buffer, unsigned int size);
@heitbaum
Copy link
Author

Duplicate of #92

@heitbaum heitbaum closed this May 18, 2024
cmitu added a commit to cmitu/RetroPie-Setup that referenced this pull request Jul 5, 2024
A buildfix patch [1] has been commited recently, but it introduced a regression [2].
Use the patch from [3] to replace the buildfix patch, since it has no side effects, until the libretro repository patches the issue.

[1] libretro/libretro-atari800#92
[2] libretro/libretro-atari800#96, https://retropie.org.uk/forum/topic/35513/
[3] libretro/libretro-atari800#95
twojstaryzdomu pushed a commit to twojstaryzdomu/RetroPie-Setup that referenced this pull request Dec 15, 2024
A buildfix patch [1] has been commited recently, but it introduced a regression [2].
Use the patch from [3] to replace the buildfix patch, since it has no side effects, until the libretro repository patches the issue.

[1] libretro/libretro-atari800#92
[2] libretro/libretro-atari800#96, https://retropie.org.uk/forum/topic/35513/
[3] libretro/libretro-atari800#95
twojstaryzdomu pushed a commit to twojstaryzdomu/RetroPie-Setup that referenced this pull request Dec 15, 2024
A buildfix patch [1] has been commited recently, but it introduced a regression [2].
Use the patch from [3] to replace the buildfix patch, since it has no side effects, until the libretro repository patches the issue.

[1] libretro/libretro-atari800#92
[2] libretro/libretro-atari800#96, https://retropie.org.uk/forum/topic/35513/
[3] libretro/libretro-atari800#95
twojstaryzdomu pushed a commit to twojstaryzdomu/RetroPie-Setup that referenced this pull request Dec 15, 2024
A buildfix patch [1] has been commited recently, but it introduced a regression [2].
Use the patch from [3] to replace the buildfix patch, since it has no side effects, until the libretro repository patches the issue.

[1] libretro/libretro-atari800#92
[2] libretro/libretro-atari800#96, https://retropie.org.uk/forum/topic/35513/
[3] libretro/libretro-atari800#95
twojstaryzdomu pushed a commit to twojstaryzdomu/RetroPie-Setup that referenced this pull request Dec 15, 2024
A buildfix patch [1] has been commited recently, but it introduced a regression [2].
Use the patch from [3] to replace the buildfix patch, since it has no side effects, until the libretro repository patches the issue.

[1] libretro/libretro-atari800#92
[2] libretro/libretro-atari800#96, https://retropie.org.uk/forum/topic/35513/
[3] libretro/libretro-atari800#95
twojstaryzdomu pushed a commit to twojstaryzdomu/RetroPie-Setup that referenced this pull request Dec 15, 2024
A buildfix patch [1] has been commited recently, but it introduced a regression [2].
Use the patch from [3] to replace the buildfix patch, since it has no side effects, until the libretro repository patches the issue.

[1] libretro/libretro-atari800#92
[2] libretro/libretro-atari800#96, https://retropie.org.uk/forum/topic/35513/
[3] libretro/libretro-atari800#95
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.

1 participant