poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] poke: reorganize code under conditional compilation


From: Jose E. Marchesi
Subject: Re: [PATCH] poke: reorganize code under conditional compilation
Date: Tue, 03 Oct 2023 20:39:35 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Hello Vincenzo.

This is OK for master, provided you add a ChangeLog entry.
Welcome! :)

> This commit fixes some build warnings I encountered
> during compilation. I noticed that certain code is only
> used under specific conditional compilation definitions.
>
> This commit addresses the following warnings.
>
> make  all-am
> make[3]: Entering directory '/home/vincenzopalazzo/gittea/poke/build/poke'
> gcc -DHAVE_CONFIG_H -I. -I../../poke -I../gl -I../../gl -I../../common
> -I../../libpoke -I../libpoke -DJITTER_VERSION=\"0.9.297\"
> -DPKGINFODIR=\"/home/vincenzopalazzo/build-bin/share/info\"
> -DLOCALEDIR=\"/home/vincenzopalazzo/build-bin/share/locale\" -Wall -g
> -O2 -MT poke-pk-term.o -MD -MP -MF .deps/poke-pk-term.Tpo -c -o
> poke-pk-term.o `test -f 'pk-term.c' || echo '../../poke/'`pk-term.c
> ../../poke/pk-term.c:162:12: warning: 'default_bgcolor' defined but not used 
> [-Wunused-variable]
>   162 | static int default_bgcolor;
>       |            ^~~~~~~~~~~~~~~
> ../../poke/pk-term.c:161:12: warning: 'default_color' defined but not used 
> [-Wunused-variable]
>   161 | static int default_color;
>       |            ^~~~~~~~~~~~~
> mv -f .deps/poke-pk-term.Tpo .deps/poke-pk-term.Po
>
> Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
> ---
>  poke/pk-term.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/poke/pk-term.c b/poke/pk-term.c
> index cad4ca16..71f83a7a 100644
> --- a/poke/pk-term.c
> +++ b/poke/pk-term.c
> @@ -158,9 +158,6 @@ pop_active_class (const char *name)
>     codes, but not the other way around (since it is really a 1-N
>     relationship.)  */
>  
> -static int default_color;
> -static int default_bgcolor;
> -
>  struct color_entry
>  {
>    term_color_t code;
> @@ -171,6 +168,11 @@ struct color_entry
>  
>  static struct color_entry *color_registry;
>  
> +#if defined HAVE_TEXTSTYLE_ACCESSORS_SUPPORT
> +
> +static int default_color;
> +static int default_bgcolor;
> +
>  static struct color_entry *
>  lookup_color (int red, int green, int blue)
>  {
> @@ -187,7 +189,6 @@ lookup_color (int red, int green, int blue)
>    return entry;
>  }
>  
> -#if defined HAVE_TEXTSTYLE_ACCESSORS_SUPPORT
>  
>  static struct color_entry *
>  lookup_color_code (int code)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]