/in/foo.cc: In function 'int number(int*, int)':
/in/foo.cc:12:19: warning: NULL used in arithmetic [-Wpointer-arith]
if (a[i + j] == NULL) { state = 100; }
^~~~
/in/foo.cc:14:51: warning: NULL used in arithmetic [-Wpointer-arith]
if (a[i + j] >= a[i + j - 1] && a[i + j + 1] == NULL) {
^~~~
/in/foo.cc:26:52: warning: NULL used in arithmetic [-Wpointer-arith]
if (a[i + j] <= a[i + j - 1] && a[i + j + 1] == NULL) {
^~~~
/in/foo.cc:5:9: warning: unused variable 'over' [-Wunused-variable]
int j, over, b, v, k;
^~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:109:9: warning: converting to non-pointer type 'int' from NULL [-Wconversion-null]
a[i] = NULL;
^~~~
/in/foo.cc:110:22: warning: NULL used in arithmetic [-Wpointer-arith]
for (i = 0; a[i] != NULL; i++) {
^~~~
/in/foo.cc: In function 'int number(int*, int)':
/in/foo.cc:91:66: warning: 'v' may be used uninitialized in this function [-Wmaybe-uninitialized]
else if (a[i + k] != a[i + k - 1]) { sum[i + k] = sum[i + k] + v - count2 - k; g++; }
~~~~~~~~~~~^~~
/in/foo.cc:85:10: warning: 'b' may be used uninitialized in this function [-Wmaybe-uninitialized]
sum[i + b] = x + 1;
~~^~~