Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: HEAD building fails on ubuntu 9.10

On Sun, 18 Apr 2010, Elric wrote:
> i fetched the sources of the src module in /usr, so now i have an
> /usr/src directory containing all the netbsd source code. Fine.
> After building the tools and a kernel, i've given this command:
> ./ -O obj/ -U -u -m i386 distribution

Fine so far.

> /usr/src/lib/libc/string/swab.c(69): warning: bitwise operation on
> signed value possibly nonportable [117]

When reporting problems with -current, it's usually useful to say what
date/time you checked out the sources, or what the revison numbers of
relevant files are.  Since swab.c has changed several times recently, it
would have been especially useful to mention which version you had.

I guess, from the line number in the error message, that you have
revision 1.11 of swab.c, in which line 68 contains "len >>= 3;".  If
you do in fact have revision 1.11 of swab.c, then len should have type
size_t, which is required by the C standard to be an unsigned type, so
the error message doesn't make sense.  (The latest version of swab.c
defines len as ssize_t, a signed type, but it tests that the value is
positive before using the ">>=" operator, so again the operation should
be well-defined in terms of the C standard, although it's easier to see
how a conpiler could get confused.)

Could you report what revision of swab.c you had at the time you
encountered the problem; check whether Ubuntu defines size_t as an
unsigned type; and try again with the latest revision of swab.c (which
is 1.15 right now, but which migth change again soon).

--apb (Alan Barrett)

Home | Main Index | Thread Index | Old Index