mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Anton Blanchard <anton@samba.org>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Remove function prototype inside function
Date: Fri, 27 Aug 2004 18:13:17 +1000	[thread overview]
Message-ID: <20040827081317.GD11731@krispykreme> (raw)


Hi,

I had a problem when compiling a 2.6 kernel with gcc 3.5 CVS. The
prototype for prio_tree_remove in mm/prio_tree.c is inside another
function. gcc 3.5 gets upset and removes the function completely.
Apparently this isnt valid C, so lets fix it up.

Details can be found here:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17205

Signed-off-by: Anton Blanchard <anton@samba.org>

===== mm/prio_tree.c 1.7 vs edited =====
--- 1.7/mm/prio_tree.c	Mon Aug 23 18:15:12 2004
+++ edited/mm/prio_tree.c	Fri Aug 27 16:28:34 2004
@@ -81,6 +81,8 @@
 	return index_bits_to_maxindex[bits - 1];
 }
 
+static void prio_tree_remove(struct prio_tree_root *, struct prio_tree_node *);
+
 /*
  * Extend a priority search tree so that it can store a node with heap_index
  * max_heap_index. In the worst case, this algorithm takes O((log n)^2).
@@ -90,8 +92,6 @@
 static struct prio_tree_node *prio_tree_expand(struct prio_tree_root *root,
 		struct prio_tree_node *node, unsigned long max_heap_index)
 {
-	static void prio_tree_remove(struct prio_tree_root *,
-					struct prio_tree_node *);
 	struct prio_tree_node *first = NULL, *prev, *last = NULL;
 
 	if (max_heap_index > prio_tree_maxindex(root->index_bits))

                 reply	other threads:[~2004-08-27  8:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040827081317.GD11731@krispykreme \
    --to=anton@samba.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®