linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix sparse warnings
@ 2005-12-31  7:21 Alecs King
  0 siblings, 0 replies; only message in thread
From: Alecs King @ 2005-12-31  7:21 UTC (permalink / raw)
  To: linux-sparse

sort.c:192:5: warning: mixing declarations and code
sort.c:234:2: warning: mixing declarations and code

Signed-off-by: Alecs King <alecsk@gmail.com>


diff --git a/sort.c b/sort.c
index c2ac8b7..749339a 100644
--- a/sort.c
+++ b/sort.c
@@ -186,10 +186,10 @@ merge_block_seqs (struct ptr_list *b1, i
 			// Element from b2 is smaller
 			buffer[nbuf++] = d2;
 			if (++i2 >= b2->nr) {
+				struct ptr_list *l = b2;
 				BEEN_THERE('M');
 				// Ok, we finished with b2.  Pull it out
 				// and plug it in before b1.
-				struct ptr_list *l = b2;
 
 				b2 = b2->next;
 				b2->prev = l->prev;
@@ -224,14 +224,13 @@ merge_block_seqs (struct ptr_list *b1, i
 
 void sort_list(struct ptr_list **plist, int (*cmp)(const void *, const void *))
 {
-	struct ptr_list *head = *plist;
+	struct ptr_list *head = *plist, *list = head;
 	int blocks = 1;
 
 	if (!head)
 		return;
 
 	// Sort all the sub-lists
-	struct ptr_list *list = head;
 	do {
 		array_sort(list->list, list->nr, cmp);
 #ifdef PARANOIA

-- 
Alecs King

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2005-12-31  7:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-31  7:21 [PATCH] fix sparse warnings Alecs King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).