mtd/util mtd_debug.c,1.3,1.4

David Woodhouse dwmw2 at infradead.org
Thu Apr 3 06:50:46 EST 2003


Update of /home/cvs/mtd/util
In directory phoenix.infradead.org:/tmp/cvs-serv9968

Modified Files:
	mtd_debug.c 
Log Message:
From: 	Stephane Fillod <f4cfe at free.fr>
* gcc-3.x warning cleanups in mtd_debug.c


Index: mtd_debug.c
===================================================================
RCS file: /home/cvs/mtd/util/mtd_debug.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- mtd_debug.c	10 Jan 2002 14:16:58 -0000	1.3
+++ mtd_debug.c	3 Apr 2003 11:50:43 -0000	1.4
@@ -124,10 +124,10 @@
    if ((buf = (u_int8_t *) malloc (size)) == NULL)
 	 {
 #define BUF_SIZE	(64 * 1024 * sizeof (u_int8_t))
-		fprintf (stderr, __FUNCTION__ ": malloc(%#x)\n", size);
+		fprintf (stderr, "%s: malloc(%#x)\n", __FUNCTION__, size);
 		if (size != BUF_SIZE) {
 			size = BUF_SIZE;
-			fprintf (stderr, __FUNCTION__ ": trying buffer size %#x\n", size);
+			fprintf (stderr, "%s: trying buffer size %#x\n", __FUNCTION__, size);
 			goto retry;
 		}
 		perror ("malloc()");
@@ -139,14 +139,14 @@
    err = read (fd,buf,size);
    if (err < 0)
 	 {
-		fprintf (stderr, __FUNCTION__ ": read, size %#x, n %#x\n", size, n);
+		fprintf (stderr, "%s: read, size %#x, n %#x\n", __FUNCTION__, size, n);
 		perror ("read()");
 		goto err2;
 	 }
    err = write (outfd,buf,size);
    if (err < 0)
 	 {
-		fprintf (stderr, __FUNCTION__ ": write, size %#x, n %#x\n", size, n);
+		fprintf (stderr, "%s: write, size %#x, n %#x\n", __FUNCTION__, size, n);
 		perror ("write()");
 		goto err2;
 	 }
@@ -194,10 +194,10 @@
 retry:
    if ((buf = (u_int8_t *) malloc (size)) == NULL)
 	 {
-		fprintf (stderr, __FUNCTION__ ": malloc(%#x) failed\n", size);
+		fprintf (stderr, "%s: malloc(%#x) failed\n", __FUNCTION__, size);
 		if (size != BUF_SIZE) {
 			size = BUF_SIZE;
-			fprintf (stderr, __FUNCTION__ ": trying buffer size %#x\n", size);
+			fprintf (stderr, "%s: trying buffer size %#x\n", __FUNCTION__, size);
 			goto retry;
 		}
 		perror ("malloc()");
@@ -209,7 +209,7 @@
 	   size = n;
    if (fread (buf,size,1,fp) != 1 || ferror (fp))
 	 {
-		fprintf (stderr, __FUNCTION__ ": fread, size %#x, n %#x\n", size, n);
+		fprintf (stderr, "%s: fread, size %#x, n %#x\n", __FUNCTION__, size, n);
 		perror ("fread()");
 		free (buf);
 		fclose (fp);
@@ -218,7 +218,7 @@
    err = write (fd,buf,size);
    if (err < 0)
 	 {
-		fprintf (stderr, __FUNCTION__ ": write, size %#x, n %#x\n", size, n);
+		fprintf (stderr, "%s: write, size %#x, n %#x\n", __FUNCTION__, size, n);
 		perror ("write()");
 		free (buf);
 		fclose (fp);
@@ -298,7 +298,7 @@
 	 printf ("MTD_WRITEABLE");
    else
 	 {
-		int i,first = 1;
+		int first = 1;
 		static struct
 		  {
 			 const char *name;




More information about the linux-mtd-cvs mailing list