diff 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
line wrap: on
line diff
--- a/src/lib-storage/index/index-sort.c	Mon Jun 25 00:01:59 2012 +0300
+++ b/src/lib-storage/index/index-sort.c	Mon Jun 25 01:14:03 2012 +0300
@@ -470,8 +470,8 @@
 
 			str1 = t_str_new(256);
 			str2 = t_str_new(256);
-			index_sort_header_get(mail, seq1, sort_type, str1);
-			index_sort_header_get(mail, seq2, sort_type, str2);
+			(void)index_sort_header_get(mail, seq1, sort_type, str1);
+			(void)index_sort_header_get(mail, seq2, sort_type, str2);
 
 			ret = strcmp(str_c(str1), str_c(str2));
 		} T_END;