Re: [hatari-devel] fix a warning for debugui.c

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Le 11/02/2018 à 17:45, Eero Tamminen a écrit :
Hi,

On 02/11/2018 09:43 AM, Thomas Huth wrote:
Am Sat, 10 Feb 2018 19:48:55 +0100
schrieb Thorsten Otto <admin@xxxxxxxxxxx>:
You could also do something like

static char my_rl_readline_name[] = "Hatari";
rl_readline_name = my_rl_readline_name;

That should work regardless how the variable is declared.

You're right, that should do the trick! Committed. Thanks for the
suggestion!

That makes code less readable and better code would declare that
array also const. Then there would again be warning when bad
header file is used.


Hi

I agree that in the long term it might be difficult to remember why we used an intermediate variable. Maybe we should keep warning for "const" conflict during development phases and just disable them when doing the release ?

Nicolas



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/