Browse Source

simplified calls to round, fix MSVC warning, pointer arithmetic

richarddobson 3 weeks ago
parent
commit
1e4b8713ef
1 changed files with 3 additions and 5 deletions
  1. 3 5
      dev/extend/extprepro.c

+ 3 - 5
dev/extend/extprepro.c

@@ -37,11 +37,9 @@
 #include <sfsys.h>
 #include <osbind.h>
 
-#if defined  unix || defined __GNUC__
+//#if defined  unix
 #define round(x) lround((x))
-#else
-#define round(x) cdp_round((x))
-#endif
+//#endif
 
 #define RANDSET     (32)  /* reduce no.of segs to small finite no, so start and end seg have chance to be chosen */
 #define FORWARDS    (1)
@@ -319,7 +317,7 @@ int eliminate_n_steps(int *this_zigtime,int *next_zigtime,int **ziglistend,int *
 {
     int *here  = this_zigtime + 1;
     int *there = next_zigtime;
-    int elimination_cnt = next_zigtime - this_zigtime - 1;
+    int elimination_cnt = (int)( next_zigtime - this_zigtime - 1);
     while(there < *ziglistend) {
         *here = *there;
         here++;