comparison src/lib-storage/index/index-sort.c @ 14682:d0d7b810646b

Make sure we check all the functions' return values. Minor API changes to simplify this. Checked using a patched clang that adds attribute(warn_unused_result) to all functions. This commit fixes several error handling mistakes.
author Timo Sirainen <tss@iki.fi>
date Mon, 25 Jun 2012 01:14:03 +0300
parents c93ca5e46a8a
children d5ebec837bfd
comparison
equal deleted inserted replaced
14681:ca37d1577291 14682:d0d7b810646b
468 T_BEGIN { 468 T_BEGIN {
469 string_t *str1, *str2; 469 string_t *str1, *str2;
470 470
471 str1 = t_str_new(256); 471 str1 = t_str_new(256);
472 str2 = t_str_new(256); 472 str2 = t_str_new(256);
473 index_sort_header_get(mail, seq1, sort_type, str1); 473 (void)index_sort_header_get(mail, seq1, sort_type, str1);
474 index_sort_header_get(mail, seq2, sort_type, str2); 474 (void)index_sort_header_get(mail, seq2, sort_type, str2);
475 475
476 ret = strcmp(str_c(str1), str_c(str2)); 476 ret = strcmp(str_c(str1), str_c(str2));
477 } T_END; 477 } T_END;
478 break; 478 break;
479 case MAIL_SORT_ARRIVAL: 479 case MAIL_SORT_ARRIVAL: