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

[ Thread Index | Date Index | More Archives ]

Le 11/02/2018 à 18:04, Thorsten Otto a écrit :
On Sonntag, 11. Februar 2018 17:48:43 CET Nicolas Pomarède wrote:
  it might be difficult to remember why we
used an intermediate variable.

but Thomas added a comment why this was done ;)

Yes, but my point was more that if we use a similar code somewhere else, we might not remember that an indirection was needed.

just disable them when doing the release ?

If you think about using -Wno-write-strings, that would disable also all
warnings for other places that might be problematic.

I agree that it is sometimes difficult to get constness right, especially when
using third-party headers where the keyword should be there, but isn't. But i
think it is better to do it this way, rather than declaring it as const and
risk a warning, or maybe even an error when compiling with C++.

The problem is that we might at one point add some indirection because 3rd party header is wrong/incomplete, but if this headers gets fixed one day, then Hatari will keep some unnecessary code and no one will think about "simplifying" it again.

Maybe we should agree that supported headers are those from linux as of a certain date, or state that some headers are different between OSes and can give more warning on macOS or Windows for example ?


Mail converted by MHonArc 2.6.19+