Skip to content

Fix compilation errors reported by GCC 15.2#13

Open
FeralChild64 wants to merge 1 commit intogp48k:masterfrom
FeralChild64:fc/compile-fix-1
Open

Fix compilation errors reported by GCC 15.2#13
FeralChild64 wants to merge 1 commit intogp48k:masterfrom
FeralChild64:fc/compile-fix-1

Conversation

@FeralChild64
Copy link

I'm getting the following errors when compiling zmac with GCC 15.2 as a part of the https://github.com/MEGA65/open-roms project:

3rdparty/zmac/src/zmac.y: In function ‘delayed_list’:
3rdparty/zmac/src/zmac.y:1471:9: error: too many arguments to function ‘bookmark’; expected 0, have 1
 1471 |         bookmark(delay);
      |         ^~~~~~~~ ~~~~~
3rdparty/zmac/src/zmac.y:721:6: note: declared here
  721 | void bookmark();
      |      ^~~~~~~~
3rdparty/zmac/src/zmac.y: In function ‘delayed_list1’:
3rdparty/zmac/src/zmac.y:1750:9: error: too many arguments to function ‘bookmark’; expected 0, have 1
 1750 |         bookmark(delay);
      |         ^~~~~~~~ ~~~~~
3rdparty/zmac/src/zmac.y:721:6: note: declared here
  721 | void bookmark();
      |      ^~~~~~~~
3rdparty/zmac/src/zmac.y: In function ‘nextchar’:
3rdparty/zmac/src/zmac.y:5735:59: error: too many arguments to function ‘getlocal’; expected 0, have 2
 5735 |                                         strcpy((char *)p, getlocal(ch, est[TEMPNUM].value));
      |                                                           ^~~~~~~~ ~~
3rdparty/zmac/src/zmac.y:5642:15: note: declared here
 5642 |         char *getlocal();
      |               ^~~~~~~~
3rdparty/zmac/src/zmac.y: At top level:
3rdparty/zmac/src/zmac.y:7952:7: error: conflicting types for ‘getlocal’; have ‘char *(int,  int)’
 7952 | char *getlocal(int c, int n)
      |       ^~~~~~~~
3rdparty/zmac/src/zmac.y:5642:15: note: previous declaration of ‘getlocal’ with type ‘char *(void)’
 5642 |         char *getlocal();
      |               ^~~~~~~~
3rdparty/zmac/src/zmac.y:8325:6: error: conflicting types for ‘bookmark’; have ‘void(int)’
 8325 | void bookmark(int delay)
      |      ^~~~~~~~
3rdparty/zmac/src/zmac.y:721:6: note: previous declaration of ‘bookmark’ with type ‘void(void)’
  721 | void bookmark();
      |      ^~~~~~~~

This PR fixes the errors above.

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