summaryrefslogtreecommitdiff
path: root/tools/setjmp_t.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2012-02-29 21:40:53 +0400
committerIvan Maidanski <ivmai@mail.ru>2012-02-29 21:40:53 +0400
commit5e4f599b440bf2f109c185c42e5c01e24fac18fe (patch)
treeb8e655be5aa3ed681f9e11f29375483e9abbb914 /tools/setjmp_t.c
parent26aec11628a60a5ac92ba7a55e729b5d0138c85c (diff)
downloadbdwgc-5e4f599b440bf2f109c185c42e5c01e24fac18fe.tar.gz
tools: Prevent compiler warnings regarding unused argument and printf
* tools/if_mach.c (main): Remove unused "envp" argument. * tools/if_not_there.c (main): Likewise. * tools/if_mach.c: Expand tabs to spaces. * tools/if_not_there.c: Likewise. * tools/setjmp_t.c (getpagesize): Define for Win32; include windows.h. * tools/setjmp_t.c (main): Make printf() format specifier string non-empty (to suppress compiler warning). * tools/setjmp_t.c (main): Adjust printf() format specifier for WORDSZ value (unsigned long instead of int).
Diffstat (limited to 'tools/setjmp_t.c')
-rw-r--r--tools/setjmp_t.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/setjmp_t.c b/tools/setjmp_t.c
index 0952fb03..7a1e285f 100644
--- a/tools/setjmp_t.c
+++ b/tools/setjmp_t.c
@@ -45,6 +45,14 @@ int getpagesize(void)
}
return((int)(result[0]));
}
+#elif defined(MSWIN32) || defined(MSWINCE) || defined(CYGWIN32)
+# include <windows.h>
+ int getpagesize(void)
+ {
+ SYSTEM_INFO sysinfo;
+ GetSystemInfo(&sysinfo);
+ return sysinfo.dwPageSize;
+ }
#endif
struct {
@@ -89,7 +97,7 @@ int main(void)
printf("Results may not be accurate/useful:\n");
/* Encourage the compiler to keep x in a callee-save register */
x = 2*x-1;
- printf("");
+ printf("\n");
x = 2*x-1;
setjmp(b);
if (y == 1) {
@@ -107,7 +115,7 @@ int main(void)
x = 2;
if (y == 1) longjmp(b,1);
printf("Some GC internal configuration stuff: \n");
- printf("\tWORDSZ = %d, ALIGNMENT = %d, GC_GRANULE_BYTES = %d\n",
+ printf("\tWORDSZ = %lu, ALIGNMENT = %d, GC_GRANULE_BYTES = %d\n",
WORDSZ, ALIGNMENT, GC_GRANULE_BYTES);
printf("\tUsing one mark ");
# if defined(USE_MARK_BYTES)