comparison extra/NaN/src/linear_model_matlab.c @ 12704:386de1bf1954 octave-forge

fix integer types - avoid compiler warnings
author schloegl
date Tue, 05 Jan 2016 09:53:40 +0000
parents 6a419bec96bb
children
comparison
equal deleted inserted replaced
12703:97f8473c1099 12704:386de1bf1954
54 extern "C" { 54 extern "C" {
55 #endif 55 #endif
56 56
57 const char *model_to_matlab_structure(mxArray *plhs[], struct model *model_) 57 const char *model_to_matlab_structure(mxArray *plhs[], struct model *model_)
58 { 58 {
59 int i; 59 size_t i;
60 int nr_w; 60 size_t nr_w;
61 double *ptr; 61 double *ptr;
62 mxArray *return_model, **rhs; 62 mxArray *return_model, **rhs;
63 int out_id = 0; 63 int out_id = 0;
64 int n, w_size; 64 size_t n, w_size;
65 65
66 rhs = (mxArray **)mxMalloc(sizeof(mxArray *)*NUM_OF_RETURN_FIELD); 66 rhs = (mxArray **)mxMalloc(sizeof(mxArray *)*NUM_OF_RETURN_FIELD);
67 67
68 /* Parameters */ 68 /* Parameters */
69 /* for now, only solver_type is needed */ 69 /* for now, only solver_type is needed */
133 return NULL; 133 return NULL;
134 } 134 }
135 135
136 const char *matlab_matrix_to_model(struct model *model_, const mxArray *matlab_struct) 136 const char *matlab_matrix_to_model(struct model *model_, const mxArray *matlab_struct)
137 { 137 {
138 int i, num_of_fields; 138 size_t i, num_of_fields;
139 int nr_w; 139 size_t nr_w;
140 double *ptr; 140 double *ptr;
141 int id = 0; 141 int id = 0;
142 int n, w_size; 142 size_t n, w_size;
143 mxArray **rhs; 143 mxArray **rhs;
144 144
145 num_of_fields = mxGetNumberOfFields(matlab_struct); 145 num_of_fields = mxGetNumberOfFields(matlab_struct);
146 rhs = (mxArray **) mxMalloc(sizeof(mxArray *)*num_of_fields); 146 rhs = (mxArray **) mxMalloc(sizeof(mxArray *)*num_of_fields);
147 147