/in/vector.c: In function 'construct':
/in/vector.c:15:13: error: unused variable 'limit' [-Werror=unused-variable]
int limit = 1;
^~~~~
/in/vector.c:14:13: error: unused variable 'size' [-Werror=unused-variable]
int size = 0;
^~~~
/in/vector.c:12:16: error: unused variable 'v' [-Werror=unused-variable]
struct vector *v;
^
/in/vector.c: In function 'extend':
/in/vector.c:26:3: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
v = (int*)malloc(2*sizeof(int)*(v -> limit));
^
/in/vector.c: In function 'contract':
/in/vector.c:32:3: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
v = (int*)malloc((1/2) * sizeof(int) * (v -> limit));
^
/in/vector.c: In function 'push_back':
/in/vector.c:39:3: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
v = (int*)malloc(sizeof(int)*(v -> limit)+1);
^
/in/vector.c:40:15: error: incompatible types when assigning to type 'vector {aka struct vector_t}' from type 'int'
v[v -> limit] = element;
^
/in/vector.c: In function 'pop_back':
/in/vector.c:47:15: error: incompatible types when assigning to type 'vector {aka struct vector_t}' from type 'void *'
v[v -> limit] = NULL;
^
/in/vector.c: In function 'get':
/in/vector.c:49:17: error: unused parameter 'v' [-Werror=unused-parameter]
int get(vector *v, unsigned int index)
^
/in/vector.c:49:33: error: unused parameter 'index' [-Werror=unused-parameter]
int get(vector *v, unsigned int index)
^~~~~
/in/vector.c: In function 'change':
/in/vector.c:54:21: error: unused parameter 'v' [-Werror=unused-parameter]
void change(vector *v, unsigned int index, int element)
^
/in/vector.c:54:37: error: unused parameter 'index' [-Werror=unused-parameter]
void change(vector *v, unsigned int index, int element)
^~~~~
/in/vector.c:54:48: error: unused parameter 'element' [-Werror=unused-parameter]
void change(vector *v, unsigned int index, int element)
^~~~~~~
/in/vector.c: In function 'print':
/in/vector.c:63:19: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
for (int i = 0; i < v -> limit; i++){
^
/in/vector.c:64:15: error: format '%lf' expects argument of type 'double', but argument 2 has type 'vector {aka struct vector_t}' [-Werror=format=]
printf("%lf ",v[i]);
~~^ ~~~~
/in/vector.c: In function 'construct':
/in/vector.c:17:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
/in/vector.c: In function 'get':
/in/vector.c:53:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
cc1: all warnings being treated as errors