[Bug 210839] databases/db5: util/db_tuner.c has K&R short int parameters with int arguments on the stack
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue Jul 5 08:06:17 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210839
Bug ID: 210839
Summary: databases/db5: util/db_tuner.c has K&R short int
parameters with int arguments on the stack
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: Individual Port(s)
Assignee: mandree at FreeBSD.org
Reporter: markmi at dsl-only.net
Assignee: mandree at FreeBSD.org
Flags: maintainer-feedback?(mandree at FreeBSD.org)
util/db_tuner.c (there are 2?) has code of the structure (using old K&R C
syntax):
static int
item_space(dbp, h, indx)
DB *dbp;
PAGE *h;
db_indx_t indx;
. . .
static int
item_size(dbp, h, indx)
DB *dbp;
PAGE *h;
db_indx_t indx;
. . .
onpd_sz += item_space(dbp, h, indx + O_INDX);
. . .
data_sz = item_size(dbp, h, indx + O_INDX);
but the arithmetic in the last arguments in each case above do not produce type
db_indx_t (a.k.a. short int) on the stack in general but instead int.
This sort of thing in K&R C type-handling contexts makes the code big endian
vs. little endian (vs. pdp-endian) sensitive and the like.
The compiler doing the build (targeting armv6 with -mcpu=cortex-a7) reported
the problems.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list