FreeBSD Bugzilla – Attachment 207179 Details for
Bug 210854
benchmarks/bonnie: Fix build warning: format specifies type 'int' but the argument has type 'long long' [-Wformat] (armv6, -mcpu=cortex-a7 for rpi2)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
svn-diff-bonnie_v3
svn-diff-bonnie (text/plain), 4.79 KB, created by
Walter Schwarzenfeld
on 2019-09-04 03:43:13 UTC
(
hide
)
Description:
svn-diff-bonnie_v3
Filename:
MIME Type:
Creator:
Walter Schwarzenfeld
Created:
2019-09-04 03:43:13 UTC
Size:
4.79 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 510780) >+++ Makefile (working copy) >@@ -3,7 +3,7 @@ > > PORTNAME= bonnie > PORTVERSION= 2.0.6 >-PORTREVISION= 1 >+PORTREVISION= 2 > CATEGORIES= benchmarks > MASTER_SITES= http://www.textuality.com/bonnie/ > DISTNAME= bonnie >Index: files/patch-Bonnie.c >=================================================================== >--- files/patch-Bonnie.c (revision 510780) >+++ files/patch-Bonnie.c (working copy) >@@ -1,9 +1,11 @@ >---- Bonnie.c.orig 1996-08-28 16:23:49 UTC >+--- Bonnie.c.orig 2019-09-04 02:16:51 UTC > +++ Bonnie.c >-@@ -25,6 +25,9 @@ >+@@ -25,6 +25,11 @@ > > #include <unistd.h> > #include <stdio.h> >++#include <string.h> >++#include <sys/wait.h> > +#if !defined(SysV) > +#include <stdlib.h> > +#endif >@@ -10,7 +12,7 @@ > #include <errno.h> > #include <fcntl.h> > #include <sys/types.h> >-@@ -49,7 +52,7 @@ >+@@ -49,7 +54,7 @@ > #define Seeks (4000) > #define UpdateSeek (10) > #define SeekProcCount (3) >@@ -19,7 +21,7 @@ > > /* labels for the tests, used as an array index */ > typedef enum >-@@ -87,7 +90,7 @@ static double delta[(int) TestCount][2]; >+@@ -87,7 +92,7 @@ static double delta[(int) TestCount][2]; > static double last_cpustamp = 0.0; /* for computing delta-t */ > static double last_timestamp = 0.0; /* for computing delta-t */ > >@@ -28,16 +30,16 @@ > int argc, > char * argv[]) > { >-@@ -146,7 +149,7 @@ main( >+@@ -146,7 +151,7 @@ main( > /* size is in meg, rounded down to multiple of Chunk */ > size *= (1024 * 1024); > size = Chunk * (size / Chunk); > - fprintf(stderr, "File '%s', size: %ld\n", name, size); >-+ fprintf(stderr, "File '%s', size: %lld\n", name, size); >++ fprintf(stderr, "File '%s', size: %lld\n", name, (signed long long)size); > > /* Fill up a file, writing it a char at a time with the stdio putc() call */ > fprintf(stderr, "Writing with putc()..."); >-@@ -167,7 +170,7 @@ main( >+@@ -167,7 +172,7 @@ main( > > /* Now read & rewrite it using block I/O. Dirty one word in each block */ > newfile(name, &fd, &stream, 0); >@@ -46,7 +48,7 @@ > io_error("lseek(2) before rewrite"); > fprintf(stderr, "Rewriting..."); > timestamp(); >-@@ -179,7 +182,7 @@ main( >+@@ -179,7 +184,7 @@ main( > if (bufindex == Chunk / IntSize) > bufindex = 0; > buf[bufindex++]++; >@@ -55,7 +57,7 @@ > io_error("relative lseek(2)"); > if (write(fd, (char *) buf, words) == -1) > io_error("re write(2)"); >-@@ -235,7 +238,7 @@ main( >+@@ -235,7 +240,7 @@ main( > > /* Now suck it in, Chunk at a time, as fast as we can */ > newfile(name, &fd, &stream, 0); >@@ -64,7 +66,7 @@ > io_error("lseek before read"); > fprintf(stderr, "Reading intelligently..."); > timestamp(); >-@@ -288,6 +291,7 @@ main( >+@@ -288,6 +293,7 @@ main( > { /* child process */ > > /* set up and wait for the go-ahead */ >@@ -72,7 +74,7 @@ > close(seek_feedback[0]); > close(seek_control[1]); > newfile(name, &fd, &stream, 0); >-@@ -303,7 +307,12 @@ main( >+@@ -303,7 +309,12 @@ main( > /* loop until we read a 0 ticket back from our parent */ > while(seek_tickets[0]) > { /* until Mom says stop */ >@@ -86,16 +88,25 @@ > ((lseek_count++ % UpdateSeek) == 0)); > if (read(seek_control[0], seek_tickets, 1) != 1) > io_error("read ticket"); >-@@ -413,7 +422,7 @@ report( >+@@ -380,7 +391,7 @@ write_html( >+ off_t size) >+ { >+ >+- printf("<TR><TD>%s</TD><TD>%d</TD>", machine, size / (1024 * 1024)); >++ printf("<TR><TD>%s</TD><TD>%lld</TD>", machine, (signed long long)size / (1024 * 1024)); >+ printf("<TD>%d</TD><TD>%4.1f</TD><TD>%d</TD><TD>%4.1f</TD><TD>%d</TD><TD>%4.1f</TD>", >+ (int) (((double) size) / (delta[(int) Putc][Elapsed] * 1024.0)), >+ delta[(int) Putc][CPU] / delta[(int) Putc][Elapsed] * 100.0, >+@@ -413,7 +424,7 @@ report( > printf("K/sec %%CPU K/sec %%CPU K/sec %%CPU K/sec %%CPU K/sec "); > printf("%%CPU /sec %%CPU\n"); > > - printf("%-8.8s %4d ", machine, size / (1024 * 1024)); >-+ printf("%-8.8s %4lld ", machine, size / (1024 * 1024)); >++ printf("%-8.8s %4lld ", machine, (signed long long)size / (1024 * 1024)); > printf("%5d %4.1f %5d %4.1f %5d %4.1f ", > (int) (((double) size) / (delta[(int) Putc][Elapsed] * 1024.0)), > delta[(int) Putc][CPU] / delta[(int) Putc][Elapsed] * 100.0, >-@@ -529,7 +538,10 @@ io_error(char * message) >+@@ -529,7 +540,10 @@ io_error(char * message) > { > char buf[Chunk]; > >@@ -107,7 +118,7 @@ > perror(buf); > exit(1); > } >-@@ -557,7 +569,7 @@ doseek( >+@@ -557,7 +571,7 @@ doseek( > off_t size; > > probe = where * Chunk; >@@ -116,7 +127,7 @@ > io_error("lseek in doseek"); > if ((size = read(fd, (char *) buf, Chunk)) == -1) > io_error("read in doseek"); >-@@ -568,7 +580,7 @@ doseek( >+@@ -568,7 +582,7 @@ doseek( > > /* touch a word */ > buf[((int) random() % (size/IntSize - 2)) + 1]--;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 210854
:
207098
|
207174
|
207175
| 207179