* random.c, spgrid.[ch]: Fix warnings with hope that I didn't broke
anything. These floats to longs and vice versa casts are starnge
indeed.
* isis_pdu.c: As we don't use %z for size_t for now because we support
older compilers, cast them to unsigned long.
Also fix previous changelog entry. Isisd compiles cleanly now again.
diff --git a/isisd/topology/random.c b/isisd/topology/random.c
index d4ef995..6ee17a0 100644
--- a/isisd/topology/random.c
+++ b/isisd/topology/random.c
@@ -10,11 +10,11 @@
#include <sys/types.h>
#include <sys/times.h>
-float timer()
+unsigned long timer()
{ struct tms hold;
times(&hold);
- return (float)(hold.tms_utime) / 60.0;
+ return (unsigned long) ((float) (hold.tms_utime) / 60.0);
}
@@ -84,6 +84,7 @@
return (long) internal_seed ;
}
+#if 0 /* Not used. */
/*********************************************************************/
/* */
/* computer independent variant of irand */
@@ -106,14 +107,14 @@
internal_seed = ( (((is2 * A1) + (is1 * A2))% T16 )* T15 + (is2 * A2) ) & B;
return (long) ( internal_seed ) ;
}
-
+#endif
/*********************************************************************/
double rand01()
-{ return (double) irand() / BF ;
+{ return (double) (irand() / BF) ;
}
/*********************************************************************/