Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Feb 2012 23:11:12 +0100
From:      Giovanni Trematerra <giovanni.trematerra@gmail.com>
To:        Dimitry Andric <dim@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r232271 - head/sys/kern
Message-ID:  <CACfq0924BFRPgHx=FBNgmtTVzMr-6tm-r1L84dHg8Y8OwzWLoQ@mail.gmail.com>
In-Reply-To: <201202282145.q1SLjLpO093657@svn.freebsd.org>
References:  <201202282145.q1SLjLpO093657@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On Tue, Feb 28, 2012 at 10:45 PM, Dimitry Andric <dim@freebsd.org> wrote:
> Author: dim
> Date: Tue Feb 28 21:45:21 2012
> New Revision: 232271
> URL: http://svn.freebsd.org/changeset/base/232271
>
> Log:
>  Change definition of pipe_chmod() from K&R to C99, to avoid the
>  following clang warning:
>
>  sys/kern/sys_pipe.c:1556:10: error: promoted type 'int' of K&R function parameter is not compatible with the parameter type 'mode_t'
>        (aka 'unsigned short') declared in a previous prototype [-Werror]
>          mode_t mode;
>                 ^
>  sys/kern/sys_pipe.c:155:19: note: previous declaration is here
>  static fo_chmod_t       pipe_chmod;
>                          ^
>
> Modified:
>  head/sys/kern/sys_pipe.c
>
> Modified: head/sys/kern/sys_pipe.c
> ==============================================================================
> --- head/sys/kern/sys_pipe.c    Tue Feb 28 21:43:29 2012        (r232270)
> +++ head/sys/kern/sys_pipe.c    Tue Feb 28 21:45:21 2012        (r232271)
> @@ -1551,11 +1551,7 @@ pipe_close(fp, td)
>  }
>
>  static int
> -pipe_chmod(fp, mode, active_cred, td)
> -       struct file *fp;
> -       mode_t mode;
> -       struct ucred *active_cred;
> -       struct thread *td;
> +pipe_chmod(struct file *fp, mode_t mode, struct ucred *active_cred, struct thread *td)
>  {
>        struct pipe *cpipe;
>        int error;

Thank you.
It introduces a style(9) violation, though.
I think it should be in this way

pipe_chmod(struct file *fp, mode_t mode, struct ucred *active_cred,
    struct thread *td)

Anyway that's not a problem I can take care of this and other style violations
during next weeks.

--
Gianni



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACfq0924BFRPgHx=FBNgmtTVzMr-6tm-r1L84dHg8Y8OwzWLoQ>