diff options
author | Joel Stanley <joel@jms.id.au> | 2018-03-06 14:32:19 +1030 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2018-03-07 16:24:31 +1100 |
commit | 2c97f136757b5428bb68f91cfa723990dcd985c8 (patch) | |
tree | 98bfd0fb1fc97552d10c2e3cdbca4478c3124f80 /.travis.yml | |
parent | 2b86765dfa37f9b447fe983967c1dcbc712a4989 (diff) | |
download | talos-petitboot-2c97f136757b5428bb68f91cfa723990dcd985c8.tar.gz talos-petitboot-2c97f136757b5428bb68f91cfa723990dcd985c8.zip |
test/parser: Fixed uninitialized variable warning
Clang has a problem with list_for_each_entry:
test/parser/utils.c:290:36: error: variable 'file' is used uninitialized whenever 'for' loop exits because its condition is false [-Werror,-Wsometimes-uninitialized]
list_for_each_entry(&test->files, f, list) {
^
./lib/list/list.h:30:3: note: expanded from macro 'list_for_each_entry'
_pos; _pos = list_next_entry(_list, _pos, _member))
^~~~
test/parser/utils.c:300:7: note: uninitialized use occurs here
if (!file) {
^~~~
test/parser/utils.c:290:36: note: remove the condition if it is always true
list_for_each_entry(&test->files, f, list) {
^
./lib/list/list.h:30:3: note: expanded from macro 'list_for_each_entry'
_pos; _pos = list_next_entry(_list, _pos, _member))
^
test/parser/utils.c:288:28: note: initialize the variable 'file' to silence this warning
struct test_file *f, *file;
^
= NULL
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to '.travis.yml')
0 files changed, 0 insertions, 0 deletions