summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2009-10-08 16:36:40 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2009-10-08 16:36:40 +0200
commit45d4dd3daa799bbc76b579bec77e6f02271b7e88 (patch)
treebd8e3f0d76d58e6bebb124287b0897d9c7572c20
parentc4f42440f3a0cf2c6b4b62b188556f8868c73754 (diff)
downloadptx-sisyphus-45d4dd3daa799bbc76b579bec77e6f02271b7e88.tar.gz
ptx-sisyphus-45d4dd3daa799bbc76b579bec77e6f02271b7e88.tar.xz
fix compiler warnings
-rw-r--r--src/alignment.c4
-rw-r--r--src/ff_bench.c4
-rw-r--r--src/float_bench.c4
-rw-r--r--src/memxfer5b.c12
-rw-r--r--src/pi8.c2
5 files changed, 14 insertions, 12 deletions
diff --git a/src/alignment.c b/src/alignment.c
index 4b0cb81..25ea1c0 100644
--- a/src/alignment.c
+++ b/src/alignment.c
@@ -36,11 +36,13 @@ int main(void)
aligned2 = *unaligned;
if (aligned1 != aligned2) {
- fprintf(stderr, "unaligned access failed (0x%08x != 0x%08x)\n",
+ fprintf(stderr, "unaligned memory access failed (0x%08x != 0x%08x)\n",
aligned1, aligned2);
exit(1);
}
+ printf("unaligned memory accesses are ok\n");
+
exit(0);
}
diff --git a/src/ff_bench.c b/src/ff_bench.c
index 69357ca..9a6590b 100644
--- a/src/ff_bench.c
+++ b/src/ff_bench.c
@@ -128,7 +128,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <ptx-sisyphus_config.h>
#endif
#include <stdio.h>
@@ -402,7 +402,7 @@ int main(int argc, char *argv[])
gettimeofday(&end_tv, NULL);
timersub(&end_tv, &begin_tv, &diff_tv);
- printf("Time(s): %u.%u\n", diff_tv.tv_sec, diff_tv.tv_usec);
+ printf("Time(s): %lu.%lu\n", diff_tv.tv_sec, diff_tv.tv_usec);
return ret;
}
diff --git a/src/float_bench.c b/src/float_bench.c
index a415173..c3e2486 100644
--- a/src/float_bench.c
+++ b/src/float_bench.c
@@ -228,7 +228,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <ptx-sisyphus_config.h>
#endif
#include <stdio.h>
@@ -837,7 +837,7 @@ int main(int argc, char *argv[])
#endif
timersub(&end_tv, &begin_tv, &diff_tv);
- printf("Time(s): %u.%u\n", diff_tv.tv_sec, diff_tv.tv_usec);
+ printf("Time(s): %lu.%lu\n", diff_tv.tv_sec, diff_tv.tv_usec);
return 0;
}
diff --git a/src/memxfer5b.c b/src/memxfer5b.c
index 179b2d4..dd0790c 100644
--- a/src/memxfer5b.c
+++ b/src/memxfer5b.c
@@ -20,7 +20,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <ptx-sisyphus_config.h>
#endif
#define __int64 long long
@@ -71,7 +71,7 @@ int main(int ac, char *av[])
size_t j;
unsigned cnt;
int method = 0;
- char *p1, *p2;
+ char *p1 = NULL, *p2 = NULL;
char *p,*q;
short *sp, *sq;
int *ip, *iq;
@@ -180,7 +180,7 @@ int main(int ac, char *av[])
tstart();
for(ui = 0; ui < cnt; ui++) {
if(!sflag) {
- (void)printf("%s %d %d %-18.18s\t",
+ (void)printf("%s %ld %d %-18.18s\t",
progname, size, cnt, methods[method]);
tstart();
}
@@ -254,11 +254,11 @@ int main(int ac, char *av[])
tottim = tval();
}
if(csvflag) {
- printf("%s,%u,%u,%8.3f,%8.3f\n",
+ printf("%s,%lu,%lu,%8.3f,%8.3f\n",
methods[method],size,size*cnt,tottim,(double)size/(tottim/cnt)/1000000.);
}
else {
- (void)printf(_("\tAVG: %d %-18.18s\t"), size, methods[method]);
+ (void)printf(_("\tAVG: %ld %-18.18s\t"), size, methods[method]);
(void)printf(" %8.3f MB/s\n", (double)size/(tottim/cnt)/1000000.);
}
tottim = 0.0;
@@ -309,7 +309,7 @@ void *Malloc(size_t sz)
p = (char *)malloc(sz);
if(p == NULL) {
- (void)printf(_("malloc(%d) failed\n"),sz);
+ (void)printf(_("malloc(%ld) failed\n"),sz);
exit(1);
}
return (void *)p;
diff --git a/src/pi8.c b/src/pi8.c
index b26ed6f..cee9024 100644
--- a/src/pi8.c
+++ b/src/pi8.c
@@ -58,7 +58,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <ptx-sisyphus_config.h>
#endif
#include <stdio.h>