The function soma() is rather curious for more than that error:
* v is vector, but you loop some global NUMHOST.
* vsVol and a are global.
* parameter vVol is not used.
Overall the loop seems to perform "count ones from v and add that amount to vsVol[a]".