Bug 210854 - benchmarks/bonnie: format specifies type 'int' but the argument has type 'long long' (armv6 with -mcpu=cortex-a7 for rpi2)
Summary: benchmarks/bonnie: format specifies type 'int' but the argument has type 'lon...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jun Kuriyama
URL: http://beefy8.nyi.freebsd.org/data/he...
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-05 20:40 UTC by Mark Millard
Modified: 2018-03-12 23:33 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (kuriyama)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Millard 2016-07-05 20:40:08 UTC
Building benchmarks/bonnie on and for an rpi2 (armv6 with -mcpu=cortex-a7) under 11.0 -r302331 reports:

Bonnie.c:392:49: warning: format specifies type 'int' but the argument has type 'long long' [-Wformat]
  printf("<TR><TD>%s</TD><TD>%d</TD>", machine, size / (1024 * 1024));
                             ~~                 ^~~~~~~~~~~~~~~~~~~~
                             %lld

This sort of thing makes the software likely big-endian vs. little-endian (vs. pdp-endian) sensitive and the like. Likely explicitly casting to long long or other such large type and using a matching format is required to survive various various targets.

The above width mismatch is less likely to appear to work for powerpc or powerpc64 (big-endian). [It will be some time before I again have access to the powerpc's.]


Side notes:

Other build notices were. . .

implicitly declaring library function 'strcmp' with type 'int (const char *, const char *)'
include the header <string.h> or explicitly provide a declaration for 'strcmp'
implicit declaration of function 'wait' is invalid in C99
implicitly declaring library function 'strerror' with type 'char *(int)'
include the header <string.h> or explicitly provide a declaration for 'strerror'
Comment 1 Mark Millard 2016-08-02 08:38:21 UTC
The build was of bonnie-2.0.6_1 --which is still in place as of /usr/ports/ -r419343 .
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2017-02-03 12:57:45 UTC
This error still appears as of 20170128, although the port does build.
Comment 3 w.schwarzenfeld freebsd_triage 2018-03-12 23:33:07 UTC
ping!