Commit e3a790c
authored
Fix compile time error in SparseData.h (#566)
In some platforms, it would error out like:
In file included from SparseData.c:21:
In function ‘compword_to_int8’,
inlined from ‘sdata_to_float8arr’ at SparseData.c:248:14:
SparseData.h:291:16: error: ‘num’ may be used uninitialized [-Werror=maybe-uninitialized]
291 | return num;
| ^~~
SparseData.c: In function ‘sdata_to_float8arr’:
SparseData.h:255:15: note: ‘num’ declared here
255 | int64 num;
| ^~~
In function ‘compword_to_int8’,
inlined from ‘sdata_index_to_int64arr’ at SparseData.c:274:17:
SparseData.h:291:16: error: ‘num’ may be used uninitialized [-Werror=maybe-uninitialized]
291 | return num;
| ^~~
SparseData.c: In function ‘sdata_index_to_int64arr’:
SparseData.h:255:15: note: ‘num’ declared here
255 | int64 num;
| ^~~
cc1: all warnings being treated as errors1 parent c98d6c4 commit e3a790c
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| 287 | + | |
| 288 | + | |
287 | 289 | | |
288 | 290 | | |
289 | 291 | | |
| |||
0 commit comments