[yocto] [psplash][PATCH 5/5] psplash: fix remaining unused-parameter warnings

Burton, Ross ross.burton at intel.com
Thu Apr 14 04:32:57 PDT 2016


All pushed, thanks Richard.

Ross

On 14 April 2016 at 11:59, Richard Leitner <richard.leitner at skidata.com>
wrote:

> Define UNUSED macro for GCC's ((__unused__)) attribute and use it for
> the remaining unused-parameter warnings. These unused parameters are
> required due to the definition of the sighandler_t.
>
> This fixes following unused-parameter warnings:
>
> psplash.c: In function 'psplash_exit':
> psplash.c:36:19: warning: unused parameter 'signum' [-Wunused-parameter]
>
> psplash-console.c: In function 'vt_request':
> psplash-console.c:27:17: warning: unused parameter 'sig'
> [-Wunused-parameter]
>
> Signed-off-by: Richard Leitner <richard.leitner at skidata.com>
> ---
>  psplash-console.c | 2 +-
>  psplash.c         | 2 +-
>  psplash.h         | 6 ++++++
>  3 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/psplash-console.c b/psplash-console.c
> index 9b7dfb9..055f5b0 100644
> --- a/psplash-console.c
> +++ b/psplash-console.c
> @@ -24,7 +24,7 @@ static int VTNumInitial   = -1;
>  static int Visible        =  1;
>
>  static void
> -vt_request (int sig)
> +vt_request (int UNUSED(sig))
>  {
>    DBG("mark, visible:%i", Visible);
>
> diff --git a/psplash.c b/psplash.c
> index c72d120..04d3d49 100644
> --- a/psplash.c
> +++ b/psplash.c
> @@ -33,7 +33,7 @@
>         )
>
>  void
> -psplash_exit (int signum)
> +psplash_exit (int UNUSED(signum))
>  {
>    DBG("mark");
>
> diff --git a/psplash.h b/psplash.h
> index 22d73a3..7b1298f 100644
> --- a/psplash.h
> +++ b/psplash.h
> @@ -69,6 +69,12 @@ typedef int            bool;
>  #define DBG(x, a...) do {} while (0)
>  #endif
>
> +#ifdef __GNUC__
> +#  define UNUSED(x) UNUSED_ ## x __attribute__((__unused__))
> +#else
> +#  define UNUSED(x) UNUSED_ ## x
> +#endif
> +
>  typedef struct PSplashFont
>  {
>      char *name;                                /* Font name. */
> --
> 2.1.4
>
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20160414/a3e345de/attachment.html>


More information about the yocto mailing list