Beep6581 / RawTherapee

A powerful cross-platform raw photo processing program
https://rawtherapee.com
GNU General Public License v3.0
2.88k stars 323 forks source link

Some compilation warnings to check before release #6563

Open Thanatomanic opened 2 years ago

Thanatomanic commented 2 years ago

I did an extended warning build of dev on Windows and gcc 12.1 with -Wall -Wextra -Wdouble-promotion -Wno-unused-parameter -Wno-double-promotion to check for things that might be improved in the codebase before we ship 5.9. Could somebody (@Floessie ?) take a look at whether something can or should be done?

I ignored warnings from dcraw.cc and decoders (CR3, Panasonic).

Floessie commented 2 years ago

@Thanatomanic I've pushed a new branch to fix some low hanging fruits. Though I don't get no deprecation warnings here.

As to rtgui/rtimage.cc: I added the Gtk::Image(), but this doesn't solve the warning.

-Warray-bounds seems to be the source of many false positives, and I don't see how we can fix it. The warnings are new with GCC 12, as far as I remember.

rtgui/adjuster.cc: This seems to be a wrong warning when T is void. Sure void t isn't used...

Feel free to add your fixes to the branch, everyone.

Best, Flössie

Pandagrapher commented 2 years ago

@Thanatomanic @Floessie For rtgui/rtscalable.cc: For RT 6.0, I am currently working on native/"real" hidpi support. I have updated these deprecated librsvg functions by the new ones. Refer to this branch if you want to correct these warnings for RT 5.9

Pierre

Lawrence37 commented 2 years ago

The lensfun deprecation warnings can be ignored for now. They are deprecated since the current stable version (0.3.3). Some replacements have only been added in 0.3.2 and the rest in 0.3.3. I suppose we could fix some warnings and bump the minimum required version to 0.3.2, which is almost 7 years old.

Lawrence37 commented 2 years ago

I pushed some warning fixes to @Floessie's branch.

Removing the deprecated GDK functions could break some things that are not trivial to fix. Let's leave them for 5.9.

Floessie commented 2 years ago

@Lawrence37 Thanks for picking this up! Two points:

Best, Flössie

Lawrence37 commented 2 years ago

@Floessie I've added std:: to the types. The copy constructor warning I think is there to enforce "good practice" of explicitly calling the base class constructors.

Lawrence37 commented 2 years ago

I pushed one more change which replaces the deprecated function rsvg_handle_free. There is one more warning I feel can be addressed. Someone on Windows could try replacing SHELLFLAGSTATE sft = { 0 } with SHELLFLAGSTATE sft = { }.

The remaining deprecated functions can stay for now.

Beep6581 commented 2 years ago

For RT 6.0, I am currently working on native/"real" hidpi support.

@Pandagrapher as it's been a few years since I dealt with the joy called HiDPI, and since I now actually have a HiDPI monitor, could you link me to some documentation on what "real" HiDPI support means and how to go about implementing it? Also, which version of Gtk+ will be required for that? Sorry for the off-topic - if there is an issue dedicated to that, feel free to reply there and tag me.

mattiaverga commented 2 years ago

I did a build of dev for Fedora Rawhide and gcc 12.2, you might be interested in some more warnings (full log here:

Beep6581 commented 2 years ago

At this point I think its best to leave this for 6.0.

Christian-Kr commented 1 year ago

Hello to everyone here,

is anyone currently working on removing gdk_threads_enter() (one warning message above). I don't have a lot of experience in GDK/GTK and its thread handling. But if no one is working on that, I will give it a try.

Thank you in advance.

Greetings

Lawrence37 commented 8 months ago

There are a few new warnings, but not from new code. See https://github.com/Beep6581/RawTherapee/issues/6621#issuecomment-1937494270.