svn commit: r334078 - head/sbin/devd

Warner Losh imp at bsdimp.com
Wed May 23 13:35:08 UTC 2018


On Wed, May 23, 2018 at 1:39 AM, Eitan Adler <eadler at freebsd.org> wrote:

> Author: eadler
> Date: Wed May 23 07:39:05 2018
> New Revision: 334078
> URL: https://svnweb.freebsd.org/changeset/base/334078
>
> Log:
>   devd: compile at WARNS=6
>
>   Verified with "make universe TARGETS='amd64 arm arm64 i386 sparc64'"
>
> Modified:
>   head/sbin/devd/Makefile
>   head/sbin/devd/devd.cc
>   head/sbin/devd/token.l
>
> ...

> Modified: head/sbin/devd/token.l
> ============================================================
> ==================
> --- head/sbin/devd/token.l      Wed May 23 07:39:02 2018        (r334077)
> +++ head/sbin/devd/token.l      Wed May 23 07:39:05 2018        (r334078)
> @@ -38,6 +38,7 @@
>  #include "devd.h"
>  #include "y.tab.h"
>
> +extern int lineno;
>  int lineno = 1;
>
>  static void


This is completely bogus.  Never ever ever just put extern in the line
before to avoid the warning. That's wrong 100% of the time.

Fix it right by putting this in devd.h.

Warner


More information about the svn-src-head mailing list