mirror of https://github.com/OpenTTD/OpenTTD
(svn r1621) -Fix: fixed some compiler warnings for the random-debug-switch
parent
2cf65953db
commit
8edff76765
|
@ -113,9 +113,9 @@ void NORETURN CDECL error(const char *str, ...);
|
|||
|
||||
#ifdef RANDOM_DEBUG
|
||||
#define Random() DoRandom(__LINE__, __FILE__)
|
||||
uint32 DoRandom(uint line, char *file);
|
||||
uint32 DoRandom(int line, const char *file);
|
||||
#define RandomRange(max) DoRandomRange(max, __LINE__, __FILE__)
|
||||
uint DoRandomRange(uint max, uint line, char *file);
|
||||
uint DoRandomRange(uint max, int line, const char *file);
|
||||
#else
|
||||
uint32 Random(void);
|
||||
uint RandomRange(uint max);
|
||||
|
|
4
misc.c
4
misc.c
|
@ -29,7 +29,7 @@ static inline uint32 ROR(uint32 x, int n)
|
|||
#ifdef RANDOM_DEBUG
|
||||
#include "network_data.h"
|
||||
|
||||
uint32 DoRandom(uint line, char *file)
|
||||
uint32 DoRandom(int line, const char *file)
|
||||
#else
|
||||
uint32 Random(void)
|
||||
#endif
|
||||
|
@ -61,7 +61,7 @@ uint32 Random(void)
|
|||
}
|
||||
|
||||
#ifdef RANDOM_DEBUG
|
||||
uint DoRandomRange(uint max, uint line, char *file)
|
||||
uint DoRandomRange(uint max, int line, const char *file)
|
||||
{
|
||||
return (uint16)DoRandom(line, file) * max >> 16;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue