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

random() defined twice with desync debug enabled #3621

Closed
DorpsGek opened this issue Feb 14, 2010 · 2 comments
Closed

random() defined twice with desync debug enabled #3621

DorpsGek opened this issue Feb 14, 2010 · 2 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

planetmaker opened the ticket and wrote:

trunk r19125

When compiling with --enable-desync-debug random() is defined twice:
ottd/trunk/src/core/random_func.hpp:88:1: warning: "Random" redefined
ottd/trunk/src/core/random_func.hpp:17:1: warning: this is the location of the previous definition

It seems to me that the # ifdef APPLE in :17 is not needed on my machine (random2.diff). It compiles fine both with and without the desync debug enabled and I didn't find an issue when connecting to the public server when using that diff.

random1.diff also silcences the warnings, but IMO is less preferrable, if the # ifdef can be skipped altogether. But there sure is somewhere a reason for the # ifdef APPLE - which I don't finde at the moment.

Attachments

Reported version: trunk
Operating system: Mac OS X


This issue was imported from FlySpray: https://bugs.openttd.org/task/3621
@DorpsGek
Copy link
Member Author

Rubidium wrote:

/usr/src/OpenTTD/compile/src/video/cocoa/../../core/random_func.hpp:88: error: new declaration 'uint32 Random()'
/usr/powerpc-apple-darwin8/System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/Quickdraw.h:3735: error: ambiguates old declaration 'short int Random()'


This comment was imported from FlySpray: https://bugs.openttd.org/task/3621#comment7594

@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Fixed

In r19133


This comment was imported from FlySpray: https://bugs.openttd.org/task/3621

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant