linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 2.4.5 and gcc v3 final
@ 2001-06-20 12:03 Kissandrakis S. George
  2001-06-20 12:24 ` Anatoly Ivanov
  0 siblings, 1 reply; 11+ messages in thread
From: Kissandrakis S. George @ 2001-06-20 12:03 UTC (permalink / raw)
  To: linux-kernel

Hello
I suppose that you allready know it
I have installed gcc v3 released Jun 18 and i tried to compile the
kernel and i got
these errors

in make dep i got several warnings that look like this

/usr/src/linux-2.4.5/include/asm/checksum.h:161:17: warning: multi-line
string literals are deprecated

but finally passed..

in make bzImage i got

timer.c:35: conflicting types for `xtime'
/usr/src/linux-2.4.5/include/linux/sched.h:540: previous declaration of
`xtime'

and compilation stops
if i remove the decleration of xtime in sched.h (remove the 540 line)
the compile
will go on and some compiles after...

time.c: In function `do_normal_gettime':
time.c:41: `xtime' undeclared (first use in this function)

and some other errors
if in time.c include the line 540 from sched.h (the xtime) the
compilation will go on
until the same error on another file
i include again the line 540 from sched.h the compilation goes on etc
etc and after lots
of errors finally i got bzImage

I didnt test bzImage if it boots 

with gcc v2.x the same kernel and kernel config it compiles,Is it a
kernel bug, a gcc
bug or something else (bad installation of gcc, my mistake etc etc)? 

Best Regards


--- 
Kissandrakis S. George                 [kissand@phaistosnetworks.gr]
Network and System Administrator       [http://www.phaistosnetworks.gr/]
Tel:(+30 81) 391882/Fax:(+30 892) 23206
Phaistos Networks S.A. - A DOL Digital Company

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 2.4.5 and gcc v3 final
  2001-06-20 12:03 2.4.5 and gcc v3 final Kissandrakis S. George
@ 2001-06-20 12:24 ` Anatoly Ivanov
  2001-06-22  1:47   ` Fabian Arias
  0 siblings, 1 reply; 11+ messages in thread
From: Anatoly Ivanov @ 2001-06-20 12:24 UTC (permalink / raw)
  To: Kissandrakis S. George; +Cc: linux-kernel

Hi,

Solution is simple:
change line 540 from "extern struct timeval xtime;"
to "extern volatile struct timeval xtime;"
and have fun :)

---
avi

Kissandrakis S. George wrote:

> Hello
> I suppose that you allready know it
> I have installed gcc v3 released Jun 18 and i tried to compile the
> kernel and i got
> these errors
> 
> in make dep i got several warnings that look like this
> 
> /usr/src/linux-2.4.5/include/asm/checksum.h:161:17: warning: multi-line
> string literals are deprecated
> 
> but finally passed..
> 
> in make bzImage i got
> 
> timer.c:35: conflicting types for `xtime'
> /usr/src/linux-2.4.5/include/linux/sched.h:540: previous declaration of
> `xtime'
> 
> and compilation stops
> if i remove the decleration of xtime in sched.h (remove the 540 line)
> the compile
> will go on and some compiles after...
> 
> time.c: In function `do_normal_gettime':
> time.c:41: `xtime' undeclared (first use in this function)
> 
> and some other errors
> if in time.c include the line 540 from sched.h (the xtime) the
> compilation will go on
> until the same error on another file
> i include again the line 540 from sched.h the compilation goes on etc
> etc and after lots
> of errors finally i got bzImage
> 
> I didnt test bzImage if it boots 
> 
> with gcc v2.x the same kernel and kernel config it compiles,Is it a
> kernel bug, a gcc
> bug or something else (bad installation of gcc, my mistake etc etc)? 
> 
> Best Regards
> 
> 
> --- 
> Kissandrakis S. George                 [kissand@phaistosnetworks.gr]
> Network and System Administrator       [http://www.phaistosnetworks.gr/]
> Tel:(+30 81) 391882/Fax:(+30 892) 23206
> Phaistos Networks S.A. - A DOL Digital Company
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 2.4.5 and gcc v3 final
  2001-06-20 12:24 ` Anatoly Ivanov
@ 2001-06-22  1:47   ` Fabian Arias
  2001-06-22  6:29     ` Anatoly Ivanov
  0 siblings, 1 reply; 11+ messages in thread
From: Fabian Arias @ 2001-06-22  1:47 UTC (permalink / raw)
  To: Anatoly Ivanov; +Cc: Kissandrakis S. George, linux-kernel


I've just applied the "patch", but te warning still appears. Is this
somthing not to be worried about or is it something serious?

/usr/src/linux-2.4.5/include/asm/checksum.h:161:17: warning: multi-line
string literals are deprecated

I had to come back to 2.95 to test the ac17. Not so happy about it. :(

Please give me some directions.

On Wed, 20 Jun 2001, Anatoly Ivanov wrote:

> Hi,
> 
> Solution is simple:
> change line 540 from "extern struct timeval xtime;"
> to "extern volatile struct timeval xtime;"
> and have fun :)
> 
> ---
> avi
> 
> Kissandrakis S. George wrote:
> 
> > Hello
> > I suppose that you allready know it
> > I have installed gcc v3 released Jun 18 and i tried to compile the
> > kernel and i got
> > these errors
> > 
> > in make dep i got several warnings that look like this
> > 
> > /usr/src/linux-2.4.5/include/asm/checksum.h:161:17: warning: multi-line
> > string literals are deprecated
> > 
> > but finally passed..
> > 
> > in make bzImage i got
> > 
> > timer.c:35: conflicting types for `xtime'
> > /usr/src/linux-2.4.5/include/linux/sched.h:540: previous declaration of
> > `xtime'
> > 
> > and compilation stops
> > if i remove the decleration of xtime in sched.h (remove the 540 line)
> > the compile
> > will go on and some compiles after...
> > 
> > time.c: In function `do_normal_gettime':
> > time.c:41: `xtime' undeclared (first use in this function)
> > 
> > and some other errors
> > if in time.c include the line 540 from sched.h (the xtime) the
> > compilation will go on
> > until the same error on another file
> > i include again the line 540 from sched.h the compilation goes on etc
> > etc and after lots
> > of errors finally i got bzImage
> > 
> > I didnt test bzImage if it boots 
> > 
> > with gcc v2.x the same kernel and kernel config it compiles,Is it a
> > kernel bug, a gcc
> > bug or something else (bad installation of gcc, my mistake etc etc)? 
> > 
> > Best Regards
> > 
> > 
> > --- 
> > Kissandrakis S. George                 [kissand@phaistosnetworks.gr]
> > Network and System Administrator       [http://www.phaistosnetworks.gr/]
> > Tel:(+30 81) 391882/Fax:(+30 892) 23206
> > Phaistos Networks S.A. - A DOL Digital Company
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at  http://www.tux.org/lkml/
> > 
> 
> 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

 ---
 Fabian Arias Mu~oz                    |               Debian GNU/Linux Sid
 Facultad de Cs. Economicas y          |      	Kernel 2.4.5ac16 - ReiserFS
 Administrativas.                      |                   "aka" dewback en
 Universidad de Concepcion   -  Chile  |               #linuxhelp IRC.CHILE


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 2.4.5 and gcc v3 final
  2001-06-22  1:47   ` Fabian Arias
@ 2001-06-22  6:29     ` Anatoly Ivanov
  2001-06-24  3:52       ` Anuradha Ratnaweera
  0 siblings, 1 reply; 11+ messages in thread
From: Anatoly Ivanov @ 2001-06-22  6:29 UTC (permalink / raw)
  To: Fabian Arias; +Cc: Kissandrakis S. George, linux-kernel

As you can see, this is just deprecation warning,
i.e. you can use multi-string literals, but
you'd better don't.

You can forget about these warnings and test ac17
with gcc3.

I hope that lk-developers would fix it one day.

---
avi

Fabian Arias wrote:

> I've just applied the "patch", but te warning still appears. Is this
> somthing not to be worried about or is it something serious?
> 
> /usr/src/linux-2.4.5/include/asm/checksum.h:161:17: warning: multi-line
> string literals are deprecated
> 
> I had to come back to 2.95 to test the ac17. Not so happy about it. :(
> 
> Please give me some directions.
> 
> On Wed, 20 Jun 2001, Anatoly Ivanov wrote:
> 



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 2.4.5 and gcc v3 final
  2001-06-22  6:29     ` Anatoly Ivanov
@ 2001-06-24  3:52       ` Anuradha Ratnaweera
  2001-06-24 16:33         ` Fabian Arias
  0 siblings, 1 reply; 11+ messages in thread
From: Anuradha Ratnaweera @ 2001-06-24  3:52 UTC (permalink / raw)
  To: Anatoly Ivanov; +Cc: linux-kernel

On Fri, Jun 22, 2001 at 10:29:25AM +0400, Anatoly Ivanov wrote:
> 
> I hope that lk-developers would fix it one day.

Multi-string literals is a nice little ANSI C feature that appears everywhere.
Why it is necessary to "fix" them?

Anuradha

-- 

Debian GNU/Linux (kernel 2.4.6-pre5)

For some reason a glaze passes over people's faces when you say
"Canada".  Maybe we should invade South Dakota or something.
		-- Sandra Gotlieb, wife of the Canadian ambassador to the U.S.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 2.4.5 and gcc v3 final
  2001-06-24  3:52       ` Anuradha Ratnaweera
@ 2001-06-24 16:33         ` Fabian Arias
  2001-06-24 17:33           ` Horst von Brand
  0 siblings, 1 reply; 11+ messages in thread
From: Fabian Arias @ 2001-06-24 16:33 UTC (permalink / raw)
  To: Anuradha Ratnaweera; +Cc: Anatoly Ivanov, linux-kernel



On Sun, 24 Jun 2001, Anuradha Ratnaweera wrote:

> On Fri, Jun 22, 2001 at 10:29:25AM +0400, Anatoly Ivanov wrote:
> > 
> > I hope that lk-developers would fix it one day.
> 
> Multi-string literals is a nice little ANSI C feature that appears everywhere.
> Why it is necessary to "fix" them?

I think that "fix" doesn't necesary mean "kill" the feature.
But is a problem that some of us, compiling the ac series with gcc-3, have
had. 

PD: My syntaxis of english should be "deprecated", jeje

> 
> Anuradha
> 
> -- 
> 
> Debian GNU/Linux (kernel 2.4.6-pre5)
> 
> For some reason a glaze passes over people's faces when you say
> "Canada".  Maybe we should invade South Dakota or something.
> 		-- Sandra Gotlieb, wife of the Canadian ambassador to the U.S.
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

 ---
 Fabian Arias Mu~oz                    |               Debian GNU/Linux Sid
 Facultad de Cs. Economicas y          |      	Kernel 2.4.5ac17 - ReiserFS
 Administrativas.                      |                   "aka" dewback en
 Universidad de Concepcion   -  Chile  |               #linuxhelp IRC.CHILE


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 2.4.5 and gcc v3 final
  2001-06-24 16:33         ` Fabian Arias
@ 2001-06-24 17:33           ` Horst von Brand
  2001-06-25 16:58             ` Anuradha Ratnaweera
                               ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Horst von Brand @ 2001-06-24 17:33 UTC (permalink / raw)
  To: Fabian Arias; +Cc: Anuradha Ratnaweera, Anatoly Ivanov, linux-kernel

Fabian Arias <dewback@vtr.net> said:
> On Sun, 24 Jun 2001, Anuradha Ratnaweera wrote:
> > On Fri, Jun 22, 2001 at 10:29:25AM +0400, Anatoly Ivanov wrote:
> > > I hope that lk-developers would fix it one day.

> > Multi-string literals is a nice little ANSI C feature that appears
> > everywhere.  Why it is necessary to "fix" them?

> I think that "fix" doesn't necesary mean "kill" the feature.
> But is a problem that some of us, compiling the ac series with gcc-3, have
> had. 

What gcc objects to is stuff like:

   "This is a nice long string
    that just goes on
    and on\n"

which is illegal in C AFAIU. It does not object to:

   "This long string"
   "spans several lines, "
   "but legally.\n"

The first form does/did appear in several asm()s. Fix them, send a patch.
-- 
Horst von Brand                             vonbrand@sleipnir.valparaiso.cl
Casilla 9G, Vin~a del Mar, Chile                               +56 32 672616

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 2.4.5 and gcc v3 final
  2001-06-24 17:33           ` Horst von Brand
@ 2001-06-25 16:58             ` Anuradha Ratnaweera
  2001-06-25 18:59             ` [PATCH] GCC v3 warning fixes #1 (Was: Re: 2.4.5 and gcc v3 final) Anuradha Ratnaweera
  2001-06-25 22:41             ` 2.4.5 and gcc v3 final Andreas Bombe
  2 siblings, 0 replies; 11+ messages in thread
From: Anuradha Ratnaweera @ 2001-06-25 16:58 UTC (permalink / raw)
  To: Horst von Brand
  Cc: Fabian Arias, Anuradha Ratnaweera, Anatoly Ivanov, linux-kernel

On Sun, Jun 24, 2001 at 01:33:51PM -0400, Horst von Brand wrote:
> Fabian Arias <dewback@vtr.net> said:
> 
> What gcc objects to is stuff like:
> 
>    "This is a nice long string
>     that just goes on
>     and on\n"
> 
> which is illegal in C AFAIU. It does not object to:
> 
>    "This long string"
>    "spans several lines, "
>    "but legally.\n"

Agreed. I was incorrectly guessing that the it was the latter.

Anuradha

-- 

Debian GNU/Linux (kernel 2.4.6-pre5)

Don't look now, but the man in the moon is laughing at you.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH] GCC v3 warning fixes #1 (Was: Re: 2.4.5 and gcc v3 final)
  2001-06-24 17:33           ` Horst von Brand
  2001-06-25 16:58             ` Anuradha Ratnaweera
@ 2001-06-25 18:59             ` Anuradha Ratnaweera
  2001-06-25 22:41             ` 2.4.5 and gcc v3 final Andreas Bombe
  2 siblings, 0 replies; 11+ messages in thread
From: Anuradha Ratnaweera @ 2001-06-25 18:59 UTC (permalink / raw)
  To: torvalds, alan, Horst von Brand
  Cc: Fabian Arias, Anatoly Ivanov, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 750 bytes --]

On Sun, Jun 24, 2001 at 01:33:51PM -0400, Horst von Brand wrote:
> 
> What gcc objects to is stuff like:
> 
>    "This is a nice long string
>     that just goes on
>     and on\n"
> 
> which is illegal in C AFAIU. It does not object to:
> 
>    "This long string"
>    "spans several lines, "
>    "but legally.\n"
> 
> The first form does/did appear in several asm()s. Fix them, send a patch.

Here is the first patch, which will fix warnings on many drivers. It is not
tested. But most, if not all, changes should be obvious.

I have tried to keep the coding style as closely as possible to the surronding
code.

Cheers,

Anuradha

-- 

Debian GNU/Linux (kernel 2.4.6-pre5)

Reality is just a crutch for people who can't handle science fiction.



[-- Attachment #2: patch-1 --]
[-- Type: text/plain, Size: 9656 bytes --]

diff -u --recursive --new-file linux-2.4.6-pre5/drivers/atm/iphase.c linux/drivers/atm/iphase.c
--- linux-2.4.6-pre5/drivers/atm/iphase.c	Mon Jun 25 23:50:30 2001
+++ linux/drivers/atm/iphase.c	Tue Jun 26 00:41:28 2001
@@ -203,8 +203,8 @@
         ltimeout = dev->desc_tbl[i].iavcc->ltimeout; 
         delta = jiffies - dev->desc_tbl[i].timestamp;
         if (delta >= ltimeout) {
-           IF_ABR(printk("RECOVER run!! desc_tbl %d = %d  delta = %ld, 
-               time = %ld\n", i,dev->desc_tbl[i].timestamp, delta, jiffies);)
+           IF_ABR(printk("RECOVER run!! desc_tbl %d = %d  delta = %ld, time = %ld\n",
+				   i,dev->desc_tbl[i].timestamp, delta, jiffies);)
            if (dev->ffL.tcq_rd == dev->ffL.tcq_st) 
               dev->ffL.tcq_rd =  dev->ffL.tcq_ed;
            else 
diff -u --recursive --new-file linux-2.4.6-pre5/drivers/char/cyclades.c linux/drivers/char/cyclades.c
--- linux-2.4.6-pre5/drivers/char/cyclades.c	Mon Jun 25 23:50:08 2001
+++ linux/drivers/char/cyclades.c	Tue Jun 26 00:08:38 2001
@@ -3440,8 +3440,8 @@
 		}
 #ifdef CY_DEBUG_DTR
 		printk("cyc:set_line_char dropping DTR\n");
-		printk("     status: 0x%x,
-		    0x%x\n", cy_readb(base_addr+(CyMSVR1<<index)),
+		printk("     status: 0x%x, 0x%x\n",
+		    cy_readb(base_addr+(CyMSVR1<<index)),
 		    cy_readb(base_addr+(CyMSVR2<<index)));
 #endif
 	    }else{
diff -u --recursive --new-file linux-2.4.6-pre5/drivers/char/h8.c linux/drivers/char/h8.c
--- linux-2.4.6-pre5/drivers/char/h8.c	Mon Jun 25 23:50:09 2001
+++ linux/drivers/char/h8.c	Tue Jun 26 00:24:20 2001
@@ -575,8 +575,8 @@
         }
 
         if (intrbuf.word & H8_POWER_BUTTON) {
-                printk("Power switch pressed - please wait - preparing to power 
-off\n");
+                printk("Power switch pressed - please wait - preparing to \
+power off\n");
                 h8_set_event_mask(H8_POWER_BUTTON);
                 wake_up(&h8_monitor_wait);
         }
diff -u --recursive --new-file linux-2.4.6-pre5/drivers/char/rio/riocmd.c linux/drivers/char/rio/riocmd.c
--- linux-2.4.6-pre5/drivers/char/rio/riocmd.c	Mon Jun 25 23:50:11 2001
+++ linux/drivers/char/rio/riocmd.c	Tue Jun 26 00:26:38 2001
@@ -462,8 +462,8 @@
 		rio_dprintk (RIO_DEBUG_CMD, "PACKET information: Length	  0x%x (%d)\n", PacketP->len,PacketP->len );
 		rio_dprintk (RIO_DEBUG_CMD, "PACKET information: Control	 0x%x (%d)\n", PacketP->control, PacketP->control);
 		rio_dprintk (RIO_DEBUG_CMD, "PACKET information: Check	   0x%x (%d)\n", PacketP->csum, PacketP->csum );
-		rio_dprintk (RIO_DEBUG_CMD, "COMMAND information: Host Port Number 0x%x, 
-					Command Code 0x%x\n", PktCmdP->PhbNum, PktCmdP->Command );
+		rio_dprintk (RIO_DEBUG_CMD, "COMMAND information: Host Port Number 0x%x, Command Code 0x%x\n",
+			     PktCmdP->PhbNum, PktCmdP->Command );
 		return TRUE;
 	}
 
diff -u --recursive --new-file linux-2.4.6-pre5/drivers/i2c/i2c-core.c linux/drivers/i2c/i2c-core.c
--- linux-2.4.6-pre5/drivers/i2c/i2c-core.c	Mon Jun 25 23:50:31 2001
+++ linux/drivers/i2c/i2c-core.c	Tue Jun 26 00:42:55 2001
@@ -381,10 +381,10 @@
 						printk("i2c-core.o: while "
 						       "unregistering driver "
 						       "`%s', the client at "
-						       "address %02x of
-						       adapter `%s' could not
-						       be detached; driver
-						       not unloaded!",
+						       "address %02x of "
+						       "adapter `%s' could not "
+						       "be detached; driver "
+						       "not unloaded!",
 						       driver->name,
 						       client->addr,
 						       adap->name);
diff -u --recursive --new-file linux-2.4.6-pre5/drivers/i2o/i2o_core.c linux/drivers/i2o/i2o_core.c
--- linux-2.4.6-pre5/drivers/i2o/i2o_core.c	Mon Jun 25 23:50:30 2001
+++ linux/drivers/i2o/i2o_core.c	Tue Jun 26 00:39:38 2001
@@ -3319,8 +3319,8 @@
 	{
 		if(i2o_quiesce_controller(c))
 		{
-			printk(KERN_WARNING "i2o: Could not quiesce %s."  "
-				Verify setup on next system power up.\n", c->name);
+			printk(KERN_WARNING "i2o: Could not quiesce %s."
+				"  Verify setup on next system power up.\n", c->name);
 		}
 	}
 
diff -u --recursive --new-file linux-2.4.6-pre5/drivers/net/pcmcia/fmvj18x_cs.c linux/drivers/net/pcmcia/fmvj18x_cs.c
--- linux-2.4.6-pre5/drivers/net/pcmcia/fmvj18x_cs.c	Mon Jun 25 23:50:06 2001
+++ linux/drivers/net/pcmcia/fmvj18x_cs.c	Tue Jun 26 00:13:06 2001
@@ -572,8 +572,7 @@
     case XXX10304:
 	/* Read MACID from Buggy CIS */
 	if (fmvj18x_get_hwinfo(link, tuple.TupleData) == -1) {
-	    printk(KERN_NOTICE "fmvj18x_cs: unable to read hardware net 
-		address.");
+	    printk(KERN_NOTICE "fmvj18x_cs: unable to read hardware net address.");
 	    unregister_netdev(dev);
 	    goto failed;
 	}
diff -u --recursive --new-file linux-2.4.6-pre5/drivers/net/tokenring/olympic.c linux/drivers/net/tokenring/olympic.c
--- linux-2.4.6-pre5/drivers/net/tokenring/olympic.c	Mon Jun 25 23:50:01 2001
+++ linux/drivers/net/tokenring/olympic.c	Tue Jun 26 00:12:29 2001
@@ -598,8 +598,7 @@
 	printk(" stat_ring[7]: %p\n", &(olympic_priv->olympic_rx_status_ring[7])  );
 
 	printk("RXCDA: %x, rx_ring[0]: %p\n",readl(olympic_mmio+RXCDA),&olympic_priv->olympic_rx_ring[0]);
-	printk("Rx_ring_dma_addr = %08x, rx_status_dma_addr =
-%08x\n",olympic_priv->rx_ring_dma_addr,olympic_priv->rx_status_ring_dma_addr) ; 
+	printk("Rx_ring_dma_addr = %08x, rx_status_dma_addr = %08x\n",olympic_priv->rx_ring_dma_addr,olympic_priv->rx_status_ring_dma_addr) ; 
 #endif
 
 	writew((((readw(olympic_mmio+RXENQ)) & 0x8000) ^ 0x8000) | i,olympic_mmio+RXENQ);
diff -u --recursive --new-file linux-2.4.6-pre5/drivers/scsi/aic7xxx/aicasm/aicasm.c linux/drivers/scsi/aic7xxx/aicasm/aicasm.c
--- linux-2.4.6-pre5/drivers/scsi/aic7xxx/aicasm/aicasm.c	Mon Jun 25 23:50:15 2001
+++ linux/drivers/scsi/aic7xxx/aicasm/aicasm.c	Tue Jun 26 00:32:57 2001
@@ -264,8 +264,8 @@
 {
 
 	(void)fprintf(stderr,
-"usage: %-16s [-nostdinc] [-I-] [-I directory] [-o output_file]
-			[-r register_output_file] [-l program_list_file]
+"usage: %-16s [-nostdinc] [-I-] [-I directory] [-o output_file]\n\
+			[-r register_output_file] [-l program_list_file]\n\
 			input_file\n",
 			appname);
 	exit(EX_USAGE);
@@ -311,8 +311,8 @@
 
 	instrcount = 0;
 	fprintf(ofile,
-"/*
-  * DO NOT EDIT - This file is automatically generated.
+"/*\n\
+  * DO NOT EDIT - This file is automatically generated.\n\
   */\n");
 
 	fprintf(ofile, "static uint8_t seqprog[] = {\n");
@@ -344,12 +344,12 @@
 	    cur_node != NULL;
 	    cur_node = SLIST_NEXT(cur_node,links)) {
 		fprintf(ofile,
-"static int ahc_patch%d_func(struct ahc_softc *ahc);
-
-static int
-ahc_patch%d_func(struct ahc_softc *ahc)
-{
-	return (%s);
+"static int ahc_patch%d_func(struct ahc_softc *ahc);\n\
+\n\
+static int\n\
+ahc_patch%d_func(struct ahc_softc *ahc)\n\
+{\n\
+	return (%s);\n\
 }\n\n",
 			cur_node->symbol->info.condinfo->func_num,
 			cur_node->symbol->info.condinfo->func_num,
@@ -357,12 +357,12 @@
 	}
 
 	fprintf(ofile,
-"typedef int patch_func_t (struct ahc_softc *);
-struct patch {
-	patch_func_t	*patch_func;
-	uint32_t	begin	   :10,
-			skip_instr :10,
-			skip_patch :12;
+"typedef int patch_func_t (struct ahc_softc *);\n\
+struct patch {\n\
+	patch_func_t	*patch_func;\n\
+	uint32_t	begin	   :10,\n\
+			skip_instr :10,\n\
+			skip_patch :12;\n\
 } patches[] = {\n");
 
 	for(cur_patch = STAILQ_FIRST(&patches);
@@ -377,9 +377,9 @@
 	fprintf(ofile, "\n};\n");
 
 	fprintf(ofile,
-"struct cs {
-	u_int16_t	begin;
-	u_int16_t	end;
+"struct cs {\n\
+	u_int16_t	begin;\n\
+	u_int16_t	end;\n\
 } critical_sections[] = {\n");
 
 	for(cs = TAILQ_FIRST(&cs_tailq);
@@ -393,7 +393,7 @@
 	fprintf(ofile, "\n};\n");
 
 	fprintf(ofile,
-"const int num_critical_sections = sizeof(critical_sections)
+"const int num_critical_sections = sizeof(critical_sections)\n\
 				 / sizeof(*critical_sections);\n");
 
 	fprintf(stderr, "%s: %d instructions used\n", appname, instrcount);
diff -u --recursive --new-file linux-2.4.6-pre5/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c linux/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c
--- linux-2.4.6-pre5/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c	Mon Jun 25 23:50:15 2001
+++ linux/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c	Tue Jun 26 00:32:47 2001
@@ -388,8 +388,8 @@
 
 		/* Output what we have */
 		fprintf(ofile,
-"/*
-  * DO NOT EDIT - This file is automatically generated.
+"/*\n\
+  * DO NOT EDIT - This file is automatically generated.\n\
   */\n");
 		while (registers.slh_first != NULL) {
 			symbol_node_t *curnode;
diff -u --recursive --new-file linux-2.4.6-pre5/drivers/scsi/sun3_NCR5380.c linux/drivers/scsi/sun3_NCR5380.c
--- linux-2.4.6-pre5/drivers/scsi/sun3_NCR5380.c	Mon Jun 25 23:50:17 2001
+++ linux/drivers/scsi/sun3_NCR5380.c	Tue Jun 26 00:34:32 2001
@@ -1229,7 +1229,7 @@
 					    BASR_ACK)) ==
        (BASR_PHASE_MATCH | BASR_ACK)) {
 	    printk("scsi%d: BASR %02x\n", HOSTNO, NCR5380_read(BUS_AND_STATUS_REG));
-	    printk("scsi%d: bus stuck in data phase -- probably a
+	    printk("scsi%d: bus stuck in data phase -- probably a\
  single byte overrun!\n", HOSTNO); 
 	    printk("not prepared for this error!\n");
 	    printk("please e-mail sammy@oh.verio.com with a description of how this\n");
diff -u --recursive --new-file linux-2.4.6-pre5/drivers/usb/serial/keyspan.c linux/drivers/usb/serial/keyspan.c
--- linux-2.4.6-pre5/drivers/usb/serial/keyspan.c	Mon Jun 25 23:50:29 2001
+++ linux/drivers/usb/serial/keyspan.c	Tue Jun 26 00:38:12 2001
@@ -548,8 +548,7 @@
 
 	do {
 		if (urb->status) {
-			dbg(__FUNCTION__ "nonzero status: %x on endpoint
-%d.",
+			dbg(__FUNCTION__ "nonzero status: %x on endpoint %d.",
 			    urb->status, usb_pipeendpoint(urb->pipe));
 			return;
 		}

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 2.4.5 and gcc v3 final
  2001-06-24 17:33           ` Horst von Brand
  2001-06-25 16:58             ` Anuradha Ratnaweera
  2001-06-25 18:59             ` [PATCH] GCC v3 warning fixes #1 (Was: Re: 2.4.5 and gcc v3 final) Anuradha Ratnaweera
@ 2001-06-25 22:41             ` Andreas Bombe
  2001-06-26 15:04               ` Anuradha Ratnaweera
  2 siblings, 1 reply; 11+ messages in thread
From: Andreas Bombe @ 2001-06-25 22:41 UTC (permalink / raw)
  To: Horst von Brand
  Cc: Fabian Arias, Anuradha Ratnaweera, Anatoly Ivanov, linux-kernel

On Sun, Jun 24, 2001 at 01:33:51PM -0400, Horst von Brand wrote:
> What gcc objects to is stuff like:
> 
>    "This is a nice long string
>     that just goes on
>     and on\n"
> 
> which is illegal in C AFAIU. It does not object to:
> 
>    "This long string"
>    "spans several lines, "
>    "but legally.\n"

But the first example contains three newlines, the second just one.  A
thing to keep in mind when going around fixing these multi line strings,
explicit newlines have to be added.

-- 
Andreas E. Bombe <andreas.bombe@munich.netsurf.de>    DSA key 0x04880A44

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 2.4.5 and gcc v3 final
  2001-06-25 22:41             ` 2.4.5 and gcc v3 final Andreas Bombe
@ 2001-06-26 15:04               ` Anuradha Ratnaweera
  0 siblings, 0 replies; 11+ messages in thread
From: Anuradha Ratnaweera @ 2001-06-26 15:04 UTC (permalink / raw)
  To: Andreas Bombe; +Cc: linux-kernel

On Tue, Jun 26, 2001 at 12:41:49AM +0200, Andreas Bombe wrote:
> 
> But the first example contains three newlines, the second just one.  A
> thing to keep in mind when going around fixing these multi line strings,
> explicit newlines have to be added.

Some code contains very long lines (around 150 characters per line) and others
tend to limit lines to 72-80 lines.

And strings have been broken in the middle _just_ to keep the lines short, and
sometimes without caring about the additional newline. In such cases, either,
the lines should be merged or a backslash should be added to the end(s) of the
line(s).

Please refer to my patch (GCC v3 warning fixes #1) for examples.

Anuradha

-- 

Debian GNU/Linux (kernel 2.4.6-pre5)

Journalism is literature in a hurry.
		-- Matthew Arnold


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2001-06-26 15:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-20 12:03 2.4.5 and gcc v3 final Kissandrakis S. George
2001-06-20 12:24 ` Anatoly Ivanov
2001-06-22  1:47   ` Fabian Arias
2001-06-22  6:29     ` Anatoly Ivanov
2001-06-24  3:52       ` Anuradha Ratnaweera
2001-06-24 16:33         ` Fabian Arias
2001-06-24 17:33           ` Horst von Brand
2001-06-25 16:58             ` Anuradha Ratnaweera
2001-06-25 18:59             ` [PATCH] GCC v3 warning fixes #1 (Was: Re: 2.4.5 and gcc v3 final) Anuradha Ratnaweera
2001-06-25 22:41             ` 2.4.5 and gcc v3 final Andreas Bombe
2001-06-26 15:04               ` Anuradha Ratnaweera

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).