Skip to contentSkip to conversation

Teeny patch

PATCH Chris AtLee 2 participants 2 messages Jul 8, 2003 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

My compiler (gcc 2.95.3) complains about "int ret = ..." on line 385 of mtd_blkdevs-24.c

Or should I be using a newer compiler? :)

Cheers

Signature · 1 line
Chris AtLee <[email protected]>

Index: drivers/mtd/mtd_blkdevs-24.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/mtd_blkdevs-24.c,v retrieving revision 1.11

mtd/mtd_blkdevs-24.c +2 -1
diff -u -r1.11 mtd_blkdevs-24.c
@@ -380,9 +380,10 @@
 		if (tr->getgeo) {
 			struct hd_geometry g;
 			struct gendisk *gd = &(tr->blkcore_priv->gd);
+			int ret;
 
 			memset(&g, 0, sizeof(g));
-			int ret = tr->getgeo(dev, &g);
+			ret = tr->getgeo(dev, &g);
 			if (ret)
 				return ret;
 
#1 lore raw
Quoted 4 lines · Chris AtLee

My compiler (gcc 2.95.3) complains about "int ret = ..." on line 385 of mtd_blkdevs-24.c

Or should I be using a newer compiler? :)

No, gcc 2.95.3 is fine if I don't introduce accidental C99'isms.

Patch applied; thanks.

Signature · 1 line
dwmw2