Commits

Anonymous committed c02137b

fixed a few warnings and one error as reported by MSVC

Comments (0)

Files changed (2)

src/packedmatrix.c

     size_t rest = r % max_rows_per_block;
     
     size_t nblocks = (rest == 0) ? r / max_rows_per_block : r / max_rows_per_block + 1;
-    A->blocks = m4ri_mmc_calloc(nblocks + 1, sizeof(mmb_t));
+    A->blocks = (mmb_t*)m4ri_mmc_calloc(nblocks + 1, sizeof(mmb_t));
     for(i=0; i<nblocks-1; i++) {
       A->blocks[i].size = MM_MAX_MALLOC;
       A->blocks[i].data = m4ri_mmc_calloc(MM_MAX_MALLOC,1);
   {
     unsigned long mult = RADIX;
     unsigned long width = MIN(MIN(m,n),k)/2;
-    while (width > cutoff) {
+    while (width > (unsigned long)cutoff) {
       width>>=1;
       mult<<=1;
     }
   {
     unsigned long mult = RADIX;
     unsigned long width = m>>1;
-    while (width > cutoff) {
+    while (width > (unsigned long)cutoff) {
       width>>=1;
       mult<<=1;
     }
   {
     unsigned long mult = RADIX;
     unsigned long width = MIN(MIN(m,n),k)/2;
-    while (width > cutoff) {
+    while (width > (unsigned long)cutoff) {
       width>>=1;
       mult<<=1;
     }
   {
     unsigned long mult = RADIX;
     unsigned long width = m>>1;
-    while (width > cutoff) {
+    while (width > (unsigned long)cutoff) {
       width>>=1;
       mult<<=1;
     }