public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Robert Schwebel <robert@schwebel.de>
To: linux-mtd@lists.infradead.org
Subject: [PATCH] fix for some warnings
Date: Thu, 9 May 2002 13:18:53 +0200	[thread overview]
Message-ID: <20020509131853.P15258@schwebel.de> (raw)

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

Hi, 

this patch fixes some warnings in the utils directory. 

Robert
-- 
 +--------------------------------------------------------+
 | Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de |
 | Pengutronix - Linux Solutions for Science and Industry |
 |   Braunschweiger Str. 79,  31134 Hildesheim, Germany   |
 |    Phone: +49-5121-28619-0 |  Fax: +49-5121-28619-4    |
 +--------------------------------------------------------+

[-- Attachment #2: mtd-utils-20020509.1 --]
[-- Type: text/plain, Size: 2891 bytes --]

diff --exclude=CVS -urN mtd-orig/util/erase.c mtd/util/erase.c
--- mtd-orig/util/erase.c	Tue Mar 27 14:01:29 2001
+++ mtd/util/erase.c	Thu May  9 12:37:39 2002
@@ -63,7 +63,7 @@
 			}
 		}
 		printf("\rPerforming Flash Erase of length %lu at offset 0x%lx",
-				erase.length, erase.start);
+				(unsigned long)erase.length, (long)erase.start);
 		fflush(stdout);
 		if(ioctl(Fd, MEMERASE, &erase) != 0)
 		{
@@ -97,17 +97,17 @@
 		erase.start = start;
 
 		erase.length = meminfo.erasesize;
-		printf("Erase Unit Size 0x%lx, ", meminfo.erasesize);
+		printf("Erase Unit Size 0x%lx, ", (long)meminfo.erasesize);
 
 		for (; count > 0; count--) {
 			printf("\rPerforming Flash Erase of length %lu at offset 0x%lx",
-					erase.length, erase.start);
+					(unsigned long)erase.length, (long)erase.start);
 			fflush(stdout);
 
 			if(unlock != 0)
 			{
 				//Unlock the sector first.
-				printf("\rPerforming Flash unlock at offset 0x%lx",erase.start);
+				printf("\rPerforming Flash unlock at offset 0x%lx",(long)erase.start);
 				if(ioctl(Fd, MEMUNLOCK, &erase) != 0)
 				{
 					perror("\nMTD Unlock failure");
diff --exclude=CVS -urN mtd-orig/util/eraseall.c mtd/util/eraseall.c
--- mtd-orig/util/eraseall.c	Wed Apr 25 09:11:19 2001
+++ mtd/util/eraseall.c	Thu May  9 12:40:10 2002
@@ -69,8 +69,8 @@
        
        if( !quiet ) {
 	   printf( "\rErasing %ld Kibyte @ %lx -- %2ld %% complete.", 
-		   meminfo.erasesize/1024, erase.start,
-		   erase.start*100/meminfo.size );
+		   (long)meminfo.erasesize/1024, (long)erase.start,
+		   (long)(erase.start*100/meminfo.size));
        }
        fflush( stdout );
 	
@@ -83,7 +83,7 @@
    }
    if( !quiet ) {
        printf( "\rErased %ld Kibyte @ %lx -- 100%% complete.       \n",
-	       meminfo.size/1024, 0L );
+	       (long)(meminfo.size/1024), 0L );
    }
    
    return 0;
diff --exclude=CVS -urN mtd-orig/util/ftl_format.c mtd/util/ftl_format.c
--- mtd-orig/util/ftl_format.c	Thu May 18 18:04:56 2000
+++ mtd/util/ftl_format.c	Thu May  9 12:43:55 2002
@@ -43,7 +43,7 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <errno.h>
-#include <sys/time.h>
+#include <time.h>
 #include <sys/ioctl.h>
 #include <sys/stat.h>
 
diff --exclude=CVS -urN mtd-orig/util/nandtest.c mtd/util/nandtest.c
--- mtd-orig/util/nandtest.c	Mon Oct 23 19:42:43 2000
+++ mtd/util/nandtest.c	Thu May  9 12:41:10 2002
@@ -102,7 +102,7 @@
 	erase.start = 0;
 
 	printf("\nPerforming Flash Erase of length %lu at offset %lu...\n",
-		erase.length, erase.start);
+		(unsigned long)erase.length, (unsigned long)erase.start);
 	fflush(stdout);
 
 	if(ioctl(fd, MEMERASE, &erase) != 0) {
@@ -250,7 +250,7 @@
 	erase.start = 0;
 
 	printf("\nPerforming Flash Erase of length %lu at offset %lu...\n",
-		erase.length, erase.start);
+		(unsigned long)erase.length, (unsigned long)erase.start);
 	fflush(stdout);
 
 	if(ioctl(fd, MEMERASE, &erase) != 0) {

                 reply	other threads:[~2002-05-09 11: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=20020509131853.P15258@schwebel.de \
    --to=robert@schwebel.de \
    --cc=linux-mtd@lists.infradead.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