Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: compiling kern/atomic_and_64_cas.o failed
On Mon, Jan 27, 2014 at 12:02:07PM -0800, Matt Thomas wrote:
>
> On Jan 27, 2014, at 11:25 AM, Kurt Schreiner <ks%ub.uni-mainz.de@localhost>
> wrote:
>
> > Hi,
> >
> > with -current source updated some minutes ago compiling a kernel for
> > i386 failed:
> >
> > compile kern/atomic_and_64_cas.o
> > cc1: warnings being treated as errors
> > /u/NetBSD/src/sys/lib/libkern/../../../common/lib/libc/atomic/atomic_and_64_cas.c:
> > In function '__sync_fetch_and_and_8':
> > /u/NetBSD/src/sys/lib/libkern/../../../common/lib/libc/atomic/atomic_and_64_cas.c:49:1:
> > error: control reaches end of non-void function
> > --- atomic_and_64_cas.o ---
> > *** [atomic_and_64_cas.o] Error code 1
> >
> > nbmake[1]: stopped in
> > /u/NetBSD/arch/i386/obj/sys/arch/i386/compile/RADIO/lib/kern
>
> fixed.
yep, this one is fixed, but ther's another one:
compile kern/atomic_or_64_cas.o
/u/NetBSD/src/sys/lib/libkern/../../../common/lib/libc/atomic/atomic_or_64_cas.c:41:1:
error: conflicting types for '__sync_fetch_and_or_8'
cc1: warnings being treated as errors
/u/NetBSD/src/sys/lib/libkern/../../../common/lib/libc/atomic/atomic_or_64_cas.c:
In function '__sync_fetch_and_or_8':
/u/NetBSD/src/sys/lib/libkern/../../../common/lib/libc/atomic/atomic_or_64_cas.c:49:2:
error: 'return' with a value, in function returning void
--- atomic_or_64_cas.o ---
*** [atomic_or_64_cas.o] Error code 1
nbmake[1]: stopped in
/u/NetBSD/arch/i386/obj/sys/arch/i386/compile/RADIO/lib/kern
1 error
should be fixed by changing 'void' to 'uint64_t' like so:
Index: atomic_or_64_cas.c
===================================================================
RCS file: /cvsroot/src/common/lib/libc/atomic/atomic_or_64_cas.c,v
retrieving revision 1.7
diff -u -r1.7 atomic_or_64_cas.c
--- atomic_or_64_cas.c 27 Jan 2014 18:29:47 -0000 1.7
+++ atomic_or_64_cas.c 27 Jan 2014 20:41:41 -0000
@@ -37,7 +37,7 @@
uint64_t __sync_fetch_and_or_8(volatile uint64_t *addr, uint64_t val);
-void
+uint64_t
__sync_fetch_and_or_8(volatile uint64_t *addr, uint64_t val)
{
uint64_t old, new;
Kurt
Home |
Main Index |
Thread Index |
Old Index