Skip to contentSkip to conversation

compilation fixes for gcc 4.0

PATCH In review Grzegorz Piotr Jaskiewicz 1 participant 2 messages Sep 22, 2004 – Sep 23, 2004 Input drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 compilation fixes for gcc 4.0

gcc 4.0 doesn't treat this extension as valid anymore.

one of the gcc guys said to me:
" For that matter, they could neatly avoid the whole issue by writing ANSI/ISO-compliant code instead of
using GCC extensions."
That should be sufficient for explanation.

In all these cases, I see no reason to declare prototype inside body of function. It makes code less readable.

I am sure it's present in few more places, but that's the only place where I can spot it. Please apply.

Signed-off-by Grzegorz Jaskiewicz <gj at pointblue.com.pl>
tmp/grip_mp.c 2004-09-22 20:58:40 +0200 renamed from input/joystick/grip_mp.c 2004-08-14 07:37:42 +0200 +0 -0
@@ -107,6 +107,8 @@
 

static int axis_map[] = { 5, 9, 1, 5, 6, 10, 2, 6, 4, 8, 0, 4, 5, 9, 1, 5 };

+static void register_slot(int i, struct grip_mp *grip); +
/*
* Returns whether an odd or even number of bits are on in pkt. */
@@ -355,7 +357,6 @@

       u32 packet;
       int joytype = 0;
       int slot = 0;

- static void register_slot(int i, struct grip_mp *grip);

       /* Get a packet and check for validity */
#1 lore raw
Quoted 7 lines · Grzegorz Piotr Jaskiewicz

gcc 4.0 doesn't treat this extension as valid anymore.

one of the gcc guys said to me:
" For that matter, they could neatly avoid the whole issue by writing ANSI/ISO-compliant code instead of
using GCC extensions."
That should be sufficient for explanation.

Quoted 5 lines

In all these cases, I see no reason to declare prototype inside body of function. It makes code less readable.

I am sure it's present in few more places, but that's the only place where I can spot it. Please apply.

This is resend, mozilla seem to do wordwraping. Patch is attached.

Signed-off-by Grzegorz Jaskiewicz <gj at pointblue.com.pl>

---

--
GJ

drivers/input/joystick/grip_mp.c +2 -1
@@ -107,6 +107,8 @@
 
 static int axis_map[] = { 5, 9, 1, 5, 6, 10, 2, 6, 4, 8, 0, 4, 5, 9, 1, 5 };
 
+static void register_slot(int i, struct grip_mp *grip);
+
 /*
  * Returns whether an odd or even number of bits are on in pkt.
  */
@@ -355,7 +357,6 @@
 	u32 packet;
 	int joytype = 0;
 	int slot = 0;
-	static void register_slot(int i, struct grip_mp *grip);
 
 	/* Get a packet and check for validity */