Ver código fonte

[test] Fix compiler warning on older gcc versions

Reported-by: Alex Davies <alex@davz.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 13 anos atrás
pai
commit
6a4b128191
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2
    2
      src/tests/list_test.c

+ 2
- 2
src/tests/list_test.c Ver arquivo

425
 	pos = &list_tests[7];
425
 	pos = &list_tests[7];
426
 	list_iterate_entry_ok ( list_for_each_entry_continue, "293",
426
 	list_iterate_entry_ok ( list_for_each_entry_continue, "293",
427
 				pos, list, list );
427
 				pos, list, list );
428
-	pos = list_entry ( list, struct list_test, list );
428
+	ok ( pos == list_entry ( list, struct list_test, list ) );
429
 	list_iterate_entry_ok ( list_for_each_entry_continue, "47293",
429
 	list_iterate_entry_ok ( list_for_each_entry_continue, "47293",
430
 				pos, list, list );
430
 				pos, list, list );
431
 	pos = &list_tests[3];
431
 	pos = &list_tests[3];
434
 	pos = &list_tests[2];
434
 	pos = &list_tests[2];
435
 	list_iterate_entry_ok ( list_for_each_entry_continue_reverse, "74",
435
 	list_iterate_entry_ok ( list_for_each_entry_continue_reverse, "74",
436
 				pos, list, list );
436
 				pos, list, list );
437
-	pos = list_entry ( list, struct list_test, list );
437
+	ok ( pos == list_entry ( list, struct list_test, list ) );
438
 	list_iterate_entry_ok ( list_for_each_entry_continue_reverse, "39274",
438
 	list_iterate_entry_ok ( list_for_each_entry_continue_reverse, "39274",
439
 				pos, list, list );
439
 				pos, list, list );
440
 	pos = &list_tests[4];
440
 	pos = &list_tests[4];

Carregando…
Cancelar
Salvar