* [PATCH] fix for some warnings
@ 2002-05-09 11:18 Robert Schwebel
0 siblings, 0 replies; only message in thread
From: Robert Schwebel @ 2002-05-09 11:18 UTC (permalink / raw)
To: linux-mtd
[-- 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) {
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-05-09 11:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-09 11:18 [PATCH] fix for some warnings Robert Schwebel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.