summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2005-01-23 19:02:53 +0000
committertruelight <truelight@openttd.org>2005-01-23 19:02:53 +0000
commit5f6b7664f4b23b0166041c4bb4232e2706bb0451 (patch)
tree4a3a7111132c95161e4962d36e89b647b4763113
parentbd4213c12ff7c1bcf3fb52f4c2606ae99470cfd4 (diff)
downloadopenttd-5f6b7664f4b23b0166041c4bb4232e2706bb0451.tar.xz
(svn r1621) -Fix: fixed some compiler warnings for the random-debug-switch
-rw-r--r--functions.h4
-rw-r--r--misc.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/functions.h b/functions.h
index 6a5079aa4..36a8e6295 100644
--- a/functions.h
+++ b/functions.h
@@ -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);
diff --git a/misc.c b/misc.c
index 5979e61e8..2e400248b 100644
--- a/misc.c
+++ b/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;
}