CObjectSystem / COS

C Object System: a framework that brings C to the level of other high level programming languages and beyond

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hundreds lines of warning related to -Wuninitialized

laoshaw opened this issue · comments

src/./tmpl/Vector_vw.c: In function ‘cos_f_ginitWith2__mSubView__ChrVector__Range’:
include/cos/Range.h:158:11: warning: ‘<Ub120>.stride’ is used uninitialized in this function [-Wuninitialized]
  158 |   return r->stride;
      |          ~^~~~~~~~
include/cos/Range.h:168:17: warning: ‘<Ub120>.end’ is used uninitialized in this function [-Wuninitialized]
  168 |   I32 size  = (r->end - r->start + r->stride) / r->stride;
      |                ~^~~~~
include/cos/Range.h:168:26: warning: ‘<Ub120>.start’ is used uninitialized in this function [-Wuninitialized]
  168 |   I32 size  = (r->end - r->start + r->stride) / r->stride;
      |                         ~^~~~~~~
src/./tmpl/Vector_vw.c: In function ‘cos_f_ginitWith2__mSubView__ShtVector__Range’:
include/cos/Range.h:158:11: warning: ‘<Ua510>.stride’ is used uninitialized in this function [-Wuninitialized]
  158 |   return r->stride;
      |          ~^~~~~~~~
include/cos/Range.h:168:17: warning: ‘<Ua510>.end’ is used uninitialized in this function [-Wuninitialized]
  168 |   I32 size  = (r->end - r->start + r->stride) / r->stride;
      |                ~^~~~~
include/cos/Range.h:168:26: warning: ‘<Ua510>.start’ is used uninitialized in this function [-Wuninitialized]
  168 |   I32 size  = (r->end - r->start + r->stride) / r->stride;

where are these warnings coming from? you apparently have some code using Ranges that are not initialized.

Fixed in commit 4da2a40