openbsd-ports/math/dieharder/patches/patch-libdieharder_rng_file_input_c
jasper a6be837873 import dieharder-3.31.1
Dieharder is a random number generator (rng) testing suite. It is
intended to test generators, not files of possibly random numbers.
[...]

ok abieber@
2017-09-11 18:29:52 +00:00

35 lines
1.5 KiB
Plaintext

$OpenBSD: patch-libdieharder_rng_file_input_c,v 1.1.1.1 2017/09/11 18:29:52 jasper Exp $
Fix format strings.
Index: libdieharder/rng_file_input.c
--- libdieharder/rng_file_input.c.orig
+++ libdieharder/rng_file_input.c
@@ -162,7 +162,7 @@ static unsigned long int file_input_get (void *vstate)
state->rptr++;
state->rtot++;
if(verbose){
- fprintf(stdout,"# file_input() %lu: %lu/%lu -> %u\n", state->rtot, state->rptr,state->flen,(uint)iret);
+ fprintf(stdout,"# file_input() %lld: %lld/%lld -> %u\n", state->rtot, state->rptr,state->flen,(uint)iret);
}
/*
@@ -270,7 +270,7 @@ static void file_input_set (void *vstate, unsigned lon
state->rewind_cnt++;
if(verbose == D_FILE_INPUT || verbose == D_ALL){
fprintf(stderr,"# file_input(): Rewinding %s at rtot = %u\n", filename,(uint) state->rtot);
- fprintf(stderr,"# file_input(): Rewind count = %u, resetting rptr = %lu\n",state->rewind_cnt,state->rptr);
+ fprintf(stderr,"# file_input(): Rewind count = %u, resetting rptr = %lld\n",state->rewind_cnt,state->rptr);
}
} else {
return;
@@ -322,7 +322,7 @@ static void file_input_set (void *vstate, unsigned lon
cnt++;
if(verbose){
fprintf(stdout,"# file_input(): cnt = %d\n",cnt);
- fprintf(stdout,"# file_input(): state->flen set to %lu\n",state->flen);
+ fprintf(stdout,"# file_input(): state->flen set to %lld\n",state->flen);
}
}
if(strncmp(splitbuf[0],"numbit",6) == 0){