linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 2.6.1-mm2: compilation error
@ 2004-01-10 15:46 Milan Jurik
  2004-01-10 16:14 ` Trond Myklebust
  0 siblings, 1 reply; 3+ messages in thread
From: Milan Jurik @ 2004-01-10 15:46 UTC (permalink / raw)
  To: linux-kernel

Hi,

    CC      fs/nfs/nfs4proc.o
fs/nfs/nfs4proc.c: In function `nfs4_lck_type':
fs/nfs/nfs4proc.c:2042: warning: control reaches end of non-void function
fs/nfs/nfs4proc.c: In function `nfs4_proc_setlk':
fs/nfs/nfs4proc.c:2189: unknown field `clientid' specified in initializer
fs/nfs/nfs4proc.c:2189: warning: missing braces around initializer
fs/nfs/nfs4proc.c:2189: warning: (near initialization for
`otl.lock_owner')
make[3]: *** [fs/nfs/nfs4proc.o] Error 1
make[2]: *** [fs/nfs] Error 2
make[1]: *** [fs] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.1'
make: *** [stamp-build] Error 2

  I can send .config if somebody wants.
  Best regards,

         Milan Jurik

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 2.6.1-mm2: compilation error
  2004-01-10 15:46 2.6.1-mm2: compilation error Milan Jurik
@ 2004-01-10 16:14 ` Trond Myklebust
  2004-01-10 16:25   ` Milan Jurik
  0 siblings, 1 reply; 3+ messages in thread
From: Trond Myklebust @ 2004-01-10 16:14 UTC (permalink / raw)
  To: Milan Jurik; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1093 bytes --]

På lau , 10/01/2004 klokka 10:46, skreiv Milan Jurik:
> Hi,
> 
>     CC      fs/nfs/nfs4proc.o
> fs/nfs/nfs4proc.c: In function `nfs4_lck_type':
> fs/nfs/nfs4proc.c:2042: warning: control reaches end of non-void function
> fs/nfs/nfs4proc.c: In function `nfs4_proc_setlk':
> fs/nfs/nfs4proc.c:2189: unknown field `clientid' specified in initializer
> fs/nfs/nfs4proc.c:2189: warning: missing braces around initializer
> fs/nfs/nfs4proc.c:2189: warning: (near initialization for
> `otl.lock_owner')
> make[3]: *** [fs/nfs/nfs4proc.o] Error 1
> make[2]: *** [fs/nfs] Error 2
> make[1]: *** [fs] Error 2
> make[1]: Leaving directory `/usr/src/linux-2.6.1'
> make: *** [stamp-build] Error 2

No need. I'm surprised I don't see that first warning in my own
compiles.

The second one, however appears to be a compiler bug: AFAICS
concatenating C99 designated intializers in that manner is supported by
the spec (and indeed my version of gcc is quite happy with it). No
matter, though, as we can work around it.

Does the following patch work for you?

Cheers,
  Trond


[-- Attachment #2: Type: text/plain, Size: 709 bytes --]

--- linux-2.6.1-mm2/fs/nfs/nfs4proc.c.orig	2004-01-10 10:56:17.000000000 -0500
+++ linux-2.6.1-mm2/fs/nfs/nfs4proc.c	2004-01-10 11:10:11.000000000 -0500
@@ -2039,6 +2039,7 @@ nfs4_lck_type(int cmd, struct file_lock 
 			return NFS4_WRITE_LT; 
 	}
 	BUG();
+	return 0;
 }
 
 static inline uint64_t
@@ -2186,7 +2187,9 @@ nfs4_proc_setlk(struct nfs4_state *state
 	if (lsp == NULL) {
 		struct nfs4_state_owner *owner = state->owner;
 		struct nfs_open_to_lock otl = {
-			.lock_owner.clientid = server->nfs4_state->cl_clientid,
+			.lock_owner = {
+				.clientid = server->nfs4_state->cl_clientid,
+			},
 		};
 		status = -ENOMEM;
 		lsp = nfs4_alloc_lock_state(state, request->fl_owner);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 2.6.1-mm2: compilation error
  2004-01-10 16:14 ` Trond Myklebust
@ 2004-01-10 16:25   ` Milan Jurik
  0 siblings, 0 replies; 3+ messages in thread
From: Milan Jurik @ 2004-01-10 16:25 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: linux-kernel

Hi,

On Sat, 10 Jan 2004, Trond Myklebust wrote:

> P? lau , 10/01/2004 klokka 10:46, skreiv Milan Jurik:
> > Hi,
> >
> >     CC      fs/nfs/nfs4proc.o
> > fs/nfs/nfs4proc.c: In function `nfs4_lck_type':
> > fs/nfs/nfs4proc.c:2042: warning: control reaches end of non-void function
> > fs/nfs/nfs4proc.c: In function `nfs4_proc_setlk':
> > fs/nfs/nfs4proc.c:2189: unknown field `clientid' specified in initializer
> > fs/nfs/nfs4proc.c:2189: warning: missing braces around initializer
> > fs/nfs/nfs4proc.c:2189: warning: (near initialization for
> > `otl.lock_owner')
> > make[3]: *** [fs/nfs/nfs4proc.o] Error 1
> > make[2]: *** [fs/nfs] Error 2
> > make[1]: *** [fs] Error 2
> > make[1]: Leaving directory `/usr/src/linux-2.6.1'
> > make: *** [stamp-build] Error 2
>
> No need. I'm surprised I don't see that first warning in my own
> compiles.
>
> The second one, however appears to be a compiler bug: AFAICS
> concatenating C99 designated intializers in that manner is supported by
> the spec (and indeed my version of gcc is quite happy with it). No
> matter, though, as we can work around it.
>
> Does the following patch work for you?
>

Yes, thanks.
Btw. gcc version 2.95.4 from Debian/Linux/Woody/i386

> Cheers,
>   Trond
>
>

Best regards,

         Milan Jurik

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-01-10 16:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-10 15:46 2.6.1-mm2: compilation error Milan Jurik
2004-01-10 16:14 ` Trond Myklebust
2004-01-10 16:25   ` Milan Jurik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).