Open Thanatomanic opened 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
@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
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.
I pushed some warning fixes to @Floessie's branch.
rtengine/imagedata.cc
and rtengine/imageio.cc
rtgui/myflatcurve.cc
rtgui/rtimage.cc
Removing the deprecated GDK functions could break some things that are not trivial to fix. Let's leave them for 5.9.
@Lawrence37 Thanks for picking this up! Two points:
<cstdint>
IMHO it's cleaner to use std::uint*_t
.Gtk::Image
is derived from sigc::trackable()
and Glib::ObjectBase()
. AFAIK base classes are implicitly copy-constructed, that's why even adding Gtk::Image
to the list was "too much". Is the warning wrong or am I missing something?Best, Flössie
@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.
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.
rsvg_handle_get_intrinsic_size_in_pixels
was introduced in librsvg version 2.52. rsvg_handle_render_document
was introduced in 2.46. The current minimum required version in CMakeLists.txt
is 2.40.gtk_show_uri_on_window
was introduced in GTK 3.22 and is not in GTK 4. The minimum required version is 3.16 for Linux and MacOS.gdk_window_process_updates
has no replacement and I'm not sure what magic this function call does.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.
I did a build of dev
for Fedora Rawhide and gcc 12.2, you might be interested in some more warnings (full log here:
rtengine/xtrans_demosaic.cc
:
/builddir/build/BUILD/RawTherapee-4059ae5bcad8e18443bf8f37bcff84de1dcc0d03/rtengine/procparams.cc: In member function 'rtengine::procparams::ProcParams::save(Glib::ustring const&, Glib::ustring const&, bool, ParamsEdited*)':
/builddir/build/BUILD/RawTherapee-4059ae5bcad8e18443bf8f37bcff84de1dcc0d03/rtengine/procparams.cc:5877:5: note: variable tracking size limit exceeded with '-fvar-tracking-assignments', retrying without
5877 | int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bool fnameAbsolute, ParamsEdited* pedited)
| ^~~~~~~~~~
/builddir/build/BUILD/RawTherapee-4059ae5bcad8e18443bf8f37bcff84de1dcc0d03/rtengine/procparams.cc: In member function 'rtengine::procparams::ProcParams::load(Glib::ustring const&, ParamsEdited*)':
/builddir/build/BUILD/RawTherapee-4059ae5bcad8e18443bf8f37bcff84de1dcc0d03/rtengine/procparams.cc:7607:5: note: variable tracking size limit exceeded with '-fvar-tracking-assignments', retrying without
7607 | int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
| ^~~~~~~~~~
rtgui/paramsedited.cc
and rtgui/multilangmgr.cc
:
In file included from /usr/include/c++/12/string:40,
from /builddir/build/BUILD/RawTherapee-4059ae5bcad8e18443bf8f37bcff84de1dcc0d03/rtgui/multilangmgr.h:22,
from /builddir/build/BUILD/RawTherapee-4059ae5bcad8e18443bf8f37bcff84de1dcc0d03/rtgui/multilangmgr.cc:19:
In function 'std::char_traits<char>::copy(char*, char const*, unsigned long)',
inlined from 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_copy(char*, char const*, unsigned long)' at /usr/include/c++/12/bits/basic_string.h:423:21,
inlined from 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_copy(char*, char const*, unsigned long)' at /usr/include/c++/12/bits/basic_string.h:418:7,
inlined from 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace(unsigned long, unsigned long, char const*, unsigned long)' at /usr/include/c++/12/bits/basic_string.tcc:532:22,
inlined from 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::replace(unsigned long, unsigned long, char const*, unsigned long)' at /usr/include/c++/12/bits/basic_string.h:2171:19,
inlined from 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::replace(unsigned long, unsigned long, char const*)' at /usr/include/c++/12/bits/basic_string.h:2196:22,
inlined from 'MultiLangMgr::load(Glib::ustring const&, std::vector<Glib::ustring, std::allocator<Glib::ustring> > const&)' at /builddir/build/BUILD/RawTherapee-4059ae5bcad8e18443bf8f37bcff84de1dcc0d03/rtgui/multilangmgr.cc:202:35:
/usr/include/c++/12/bits/char_traits.h:431:56: warning: 'memcpy' accessing 9223372036854775810 or more bytes at offsets [2, 9223372036854775807] and 1 may overlap up to 9223372036854775813 bytes at offset -3 [-Wrestrict]
431 | return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n));
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
At this point I think its best to leave this for 6.0.
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
There are a few new warnings, but not from new code. See https://github.com/Beep6581/RawTherapee/issues/6621#issuecomment-1937494270.
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).rtengine/imagedata.cc
there are instances ofuint16
that are deprecated. Probably needs<cstdint>
'ifying.rtengine/imageio.cc
there are instances ofuint16
(and more) anduint32
that are deprecated. Probably needs<cstdint>
'ifying.rtengine/imageio.cc
something may be clobbered on line 1002:rtengine/rtlensfun.cc
this happens:rtengine/rtthumbnail.cc
there is a whole slew of[-Warray-bounds]
warnings, similar to this onertgui/adjuster.cc
it reports:rtgui/main.cc
there are calls to some deprecated GDK functionsrtgui/myflatcurve.cc
there are potentially uninitialized variablesprevCursorX
andprevCursorY
(line 1646)rtgui/options.cc
there are these[-Wmissing-field-initializers]
warnings:rtgui/rtimage.cc
things could be made more explicit:rtgui/rtscalable.cc
it is suggested to use a replacement for a deprecated function callrtgui/rtwindow.cc
it is suggested to use a replacement for a deprecated function callrtgui/thumbbrowserbase.cc
it is suggested to use a replacement for a deprecated function callrtgui/main-cli.cc
there may be some unwanted implicit fallthrough