]> granicus.if.org Git - graphviz/commitdiff
sparse SparseMatrix: use a 'size_t' for 'size'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 29 Dec 2022 19:08:55 +0000 (11:08 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 30 Dec 2022 06:46:14 +0000 (22:46 -0800)
Squashes 20 -Wsign-conversion, -Wconversion warnings.

lib/sparse/SparseMatrix.h

index b8df858bdbc840729253050a449b67affce9ab43..8d3803265f79856a55c4600a0c449c2c3abcf722 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <sparse/general.h>
 #include <stdbool.h>
+#include <stddef.h>
 #include <stdio.h>
 
 #ifdef __cplusplus
@@ -36,7 +37,7 @@ struct SparseMatrix_struct {
   void *a; /* entry values. If NULL, pattern matrix */
   int format;/* whether it is CSR, CSC, COORD. By default it is in CSR format */
   int property; /* pattern_symmetric/symmetric/skew/hermitian*/
-  int size;/* size of each entry. This allows for general matrix where each entry is, say, a matrix itself */
+  size_t size;/* size of each entry. This allows for general matrix where each entry is, say, a matrix itself */
 };
 
 typedef struct SparseMatrix_struct* SparseMatrix;