Commits

Anonymous committed 449a39b

fixed MSVC compiler warnings

Comments (0)

Files changed (3)

src/packedmatrix.c

    n = COUNT(n, 3);
    n = COUNT(n, 4);
    n = COUNT(n, 5);
-   return n ;
+   return (int)n;
 }
 
 double mzd_density(packedmatrix *A, int res) {
   long total = 0;
   
   if(res == 0)
-    res = (A->width/100.0);
+    res = (int)(A->width/100.0);
   if (res < 1)
     res = 1;
 

src/permutation.c

   if(A->ncols == 0)
     return;
   for (i=P->length-1; i>=0; i--) {
-    assert(P->values[i] >= i);
+    assert(P->values[i] >= (size_t)i);
     mzd_row_swap(A, i, P->values[i]);
   }
 }
   for(size_t j=0; j<A->nrows; j+=step_size) {
     size_t stop_row = MIN(j+step_size, A->nrows);
     for (i=P->length-1; i>=0; --i) {
-      assert(P->values[i] >= i);
+      assert(P->values[i] >= (size_t)i);
       mzd_col_swap_in_rows(A, i, P->values[i], j, stop_row);
     }
   }
   size_t i, j, l, curr_pos;
   int found;
 
-  for(curr_pos=0; curr_pos < k; curr_pos++) {
+  for(curr_pos=0; curr_pos < (size_t)k; curr_pos++) {
     found = 0;
     /* search for some pivot */
     for(j = start_col + curr_pos; j < start_col + k; j++) {
   size_t startcol = (c/RADIX)*RADIX;
   mzd_submatrix(U, A, r, 0, r+k, A->ncols);
 
-  for(i=0; i<k; i++)
+  for(i=0; i<(size_t)k; i++)
     for(j=startcol; j<c+i; j++) 
       mzd_write_bit(U, i, j,  0);
   return U;
     /* 2. extract U */
     _mzd_pluq_to_u(U, A, curr_pos, curr_pos, kbar);
     
-    if(kbar > k) {
+    if(kbar > (size_t)k) {
       const int ka = kbar/2;
       const int kb = kbar - ka;
       /* 2. generate table T */