From owner-freebsd-current@FreeBSD.ORG Thu May 26 02:01:37 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E828616A41C for ; Thu, 26 May 2005 02:01:37 +0000 (GMT) (envelope-from rodrigc@crodrigues.org) Received: from rwcrmhc14.comcast.net (rwcrmhc14.comcast.net [216.148.227.89]) by mx1.FreeBSD.org (Postfix) with ESMTP id B807643D4C for ; Thu, 26 May 2005 02:01:37 +0000 (GMT) (envelope-from rodrigc@crodrigues.org) Received: from dibbler.crodrigues.org (c-66-30-114-143.hsd1.ma.comcast.net[66.30.114.143]) by comcast.net (rwcrmhc14) with ESMTP id <200505260201370140097h9oe>; Thu, 26 May 2005 02:01:37 +0000 Received: from c-66-30-114-143.hsd1.ma.comcast.net (localhost.127.in-addr.arpa [127.0.0.1]) by dibbler.crodrigues.org (8.13.3/8.13.1) with ESMTP id j4Q21iaR080424 for ; Wed, 25 May 2005 22:01:44 -0400 (EDT) (envelope-from rodrigc@c-66-30-114-143.hsd1.ma.comcast.net) Received: (from rodrigc@localhost) by c-66-30-114-143.hsd1.ma.comcast.net (8.13.3/8.13.1/Submit) id j4Q21i8i080423 for freebsd-current@freebsd.org; Wed, 25 May 2005 22:01:44 -0400 (EDT) (envelope-from rodrigc) Date: Wed, 25 May 2005 22:01:43 -0400 From: Craig Rodrigues To: freebsd-current@freebsd.org Message-ID: <20050526020143.GA80396@crodrigues.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i Subject: [GCC 4.0 PATCH] devfs_vnops.c X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2005 02:01:38 -0000 Hi, When I tried to compile src/sys/fs/devfs/devs_vnops.c with GCC 4.0, I got the following compilation errors: /usr/src/sys/fs/devfs/devfs_vnops.c:1389: error: static declaration of 'devfs_vnodeops' follows non-static declaration /usr/src/sys/fs/devfs/devfs_vnops.c:114: error: previous declaration of 'devfs_vnodeops' was here /usr/src/sys/fs/devfs/devfs_vnops.c:1411: error: static declaration of 'devfs_specops' follows non-static declaration /usr/src/sys/fs/devfs/devfs_vnops.c:115: error: previous declaration of 'devfs_specops' was here Apparently, it is not valid C to define something as extern and then later on static in the same file, like: extern struct foo bar; static struct foo bar = { .... }; What do people think of the following patch to fix it? http://people.freebsd.org/~rodrigc/devfs_vnops.c.diff.txt -- Craig Rodrigues rodrigc@crodrigues.org