Subject: Re: kernel compile failure
To: Christian Groessler <cpg@aladdin.de>
From: Bill Sommerfeld <sommerfeld@orchard.arlington.ma.us>
List: current-users
Date: 04/04/1999 23:34:26
> trying to compile a kernel with sources supped on 4-04-99, I get the
> following:
>
> -----------
> bash-2.02# make
> cc -O2 -Werror -Wall -Wmissing-prototypes -Wstrict-prototypes
> -Wpointer-arith -I. -I../../../../arch -I../../../.. -nostdinc -DLKM
> -DDIAGNOSTIC -DGERMAN_KBD -DMAXUSERS=32 -D_KERNEL -Di386 -c
> ../../../../kern/vfs_getcwd.c
> cc1: warnings being treated as errors
> ../../../../kern/vfs_getcwd.c: In function `getcwd_common':
> ../../../../kern/vfs_getcwd.c:319: warning: `bp' might be used
> uninitialized in this function
> *** Error code 1
>
> Stop.
> bash-2.02#
Let me guess: you're still using gcc 2.7.x -- the stock compiler in
1.3.x, instead of egcs?
(the egcs in -current has some of the unused-variable warnings turned
off..)
This should now be fixed on the trunk; I'm shortly going to request a
pullup to the release branch.
Fix:
--- vfs_getcwd.c 1999/03/25 04:45:57 1.3
+++ vfs_getcwd.c 1999/04/05 03:31:44
@@ -316,7 +316,7 @@
{
struct filedesc *fdp = p->p_fd;
struct vnode *pvp = NULL;
- char *bp;
+ char *bp = NULL;
int error;
if (rvp == NULL) {
- Bill