gcmd-devel
[Top][All Lists]
Advanced

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

Re: [gcmd-dev] Fixing compilation warnings: Volunteers wanted


From: Mamoru TASAKA
Subject: Re: [gcmd-dev] Fixing compilation warnings: Volunteers wanted
Date: Mon, 17 Apr 2017 22:23:08 +0900
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0

Uwe Scholz wrote on 04/17/2017 03:05 PM:
Hi!

You might already have noticed that there accour literally hundreds of
warnings when compiling Gnome Commander. These warnings can sometimes
lead to bugs or even tell us that parts of libraries are used which
are not supported anymore. Also, Linux distributions don't like to
distribute packages with compilation warnings.

Well, and as you know, gcc warnings are sometimes just warnings and
does not mean any errors or mistakes.

For example, do you really want to fix the "error" below?
../src/dialogs/gnome-cmd-options-dialog.cc:272:58: error: format not a string 
literal, format string not checked [-Werror=format-nonliteral]
     strftime (s, sizeof(s), locale_format, localtime (&t));

Here -Wformat wants to check if "locale_format" actually meets
strftime's format (see man(3) strftime), however as it cannot be
checked because locale_format is not a string literal, it warns
that "gcc cannot check it", and now it gets error.

../src/tags/gnome-cmd-tags-doc.cc:207:16: error: enumeration value 
'TAG_AUDIO_ALBUMARTIST' not handled in switch [-Werror=switch-enum]
-Wswitch-enum warns even if there is default: case. If you want to avoid
this warning, you actually have to write all enum value in case-switch.

Regards,
Mamoru






reply via email to

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