[PATCH] fix for some warnings
Robert Schwebel
robert at schwebel.de
Thu May 9 07:18:53 EDT 2002
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 |
+--------------------------------------------------------+
-------------- next part --------------
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) {
More information about the linux-mtd
mailing list