[rtems commit] dhrystone: Fix warnings
Sebastian Huber
sebh at rtems.org
Wed Apr 5 05:23:46 UTC 2017
Module: rtems
Branch: master
Commit: 662b301d34cec51efd9b6267023f3b7ac1916fde
Changeset: http://git.rtems.org/rtems/commit/?id=662b301d34cec51efd9b6267023f3b7ac1916fde
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Apr 5 07:23:09 2017 +0200
dhrystone: Fix warnings
Close #2977.
---
testsuites/benchmarks/dhrystone/dhry_1.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/testsuites/benchmarks/dhrystone/dhry_1.c b/testsuites/benchmarks/dhrystone/dhry_1.c
index 314ef34..36ac303 100644
--- a/testsuites/benchmarks/dhrystone/dhry_1.c
+++ b/testsuites/benchmarks/dhrystone/dhry_1.c
@@ -17,6 +17,7 @@
#include "dhry.h"
+#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
@@ -217,7 +218,7 @@ execution_start:
printf ("Arr_2_Glob[8][7]: %d\n", Arr_2_Glob[8][7]);
printf (" should be: Number_Of_Runs + 10\n");
printf ("Ptr_Glob->\n");
- printf (" Ptr_Comp: %d\n", (int) Ptr_Glob->Ptr_Comp);
+ printf (" Ptr_Comp: %" PRIdPTR "\n", (intptr_t) Ptr_Glob->Ptr_Comp);
printf (" should be: (implementation-dependent)\n");
printf (" Discr: %d\n", Ptr_Glob->Discr);
printf (" should be: %d\n", 0);
@@ -228,7 +229,7 @@ execution_start:
printf (" Str_Comp: %s\n", Ptr_Glob->variant.var_1.Str_Comp);
printf (" should be: DHRYSTONE PROGRAM, SOME STRING\n");
printf ("Next_Ptr_Glob->\n");
- printf (" Ptr_Comp: %d\n", (int) Next_Ptr_Glob->Ptr_Comp);
+ printf (" Ptr_Comp: %" PRIdPTR "\n", (intptr_t) Next_Ptr_Glob->Ptr_Comp);
printf (" should be: (implementation-dependent), same as above\n");
printf (" Discr: %d\n", Next_Ptr_Glob->Discr);
printf (" should be: %d\n", 0);
@@ -283,6 +284,7 @@ execution_start:
printf ("\n");
}
+ return 0;
}
More information about the vc
mailing list