Author Topic: src and sdk: NULL replaced by nullptr; separate patches attached  (Read 3430 times)

Offline blauzahn

  • Almost regular
  • **
  • Posts: 129
src and sdk: NULL replaced by nullptr; separate patches attached
« on: December 21, 2021, 05:01:10 pm »
applied to svn 12602 and only to those files located directly in src/src and src/sdk

* most but not all cases have been simple text replacement (including comments)
* in encodingdetector.cpp in semantic describing comment NULL was kept
* in abi::__cxa_demangle 2 args 0 replaced by nullptr
* in call to MainFrame, the superflous c-style cast was deleted

If the patches are acceptable, I would appreciate if somebody applies them.

« Last Edit: December 21, 2021, 05:06:56 pm by blauzahn »

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1115
Re: src and sdk: NULL replaced by nullptr; separate patches attached
« Reply #1 on: December 21, 2021, 05:14:27 pm »
I have not tested these patches, but with your last patches my SVN client (SlikSVN) complained about chunk format and I had to apply them by hand, so please try creating a proper SVN patch (just use svn diff instead of plain diff).

Applying this may take some time, so please follow Bluehazzard's advice and create a ticket (the forum posts disappear quickly in the black hole).
« Last Edit: December 21, 2021, 05:17:46 pm by Miguel Gimenez »

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1115
Re: src and sdk: NULL replaced by nullptr; separate patches attached
« Reply #2 on: December 22, 2021, 09:59:59 am »
I managed to apply your patches using git shell and this command
Code
patch -p 1 -i /c/temp/src_sdk_NULL_to_nullptr.patch
They are in [r12604] and [r12605].

Thank you .

Offline blauzahn

  • Almost regular
  • **
  • Posts: 129
Re: src and sdk: NULL replaced by nullptr; separate patches attached
« Reply #3 on: December 22, 2021, 05:19:14 pm »
Thank you.

I am sorry, that your SVN client choked upon one patch. I will try to use svn diff instead. I still choke on the description in the cb wiki.

When looking at the bug tracker, my gut feeling is, that, although issues are not lost, they accumulate and many are still not dealt with. Tthis is not surprising.

Even, when an issue is a real one, often it may be hard to reproduce and fix -- and not to break something else unnoticed.
Especially, when there are no tests and the code has changed since the bug entry had been added. In the worst case, the "blast radius" of a bug might be huge when the separation of concerns is suboptimal.

If the code has evolved from a state a patch relies upon, it actually might be preferable to let the patch get lost in a black hole.

Granted, "issues" like the patches I provided are a piece of cake compared to the majority of listed issues. So they have a slightly higher chance of beeing dealt with/applied in the very near future. But even that might increases the effort a bit and feedback time a lot. That in turn erodes motivation.

If people observe obscure or rare bugs, my motivation to spend an unknown amount of time for bug-hunting is fairly limited when at the same time, several static/dynamic analysis tools like compiler warnings, cppcheck, sanitizer or clang-tidy already point out numerous potential (albeit not confirmed) issues. In that case, I prefer to deal with the low hanging fruit first.

When, like cb, the code depends on volunteers to help out, every single obstacle someone stumbles across, reduces the ability and motivation to help significantly.

Thanks again for applying the patches.

Have a nice day.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1115
Re: src and sdk: NULL replaced by nullptr; separate patches attached
« Reply #4 on: December 22, 2021, 05:38:08 pm »
The problem with the forum is that a critical message can get out-of-view in just a weekend.

The bug tracker is (almost) eternal and may contain many obsolete patches, but it is better obsolete and visible than crushed behind the event horizon. I am currently closing tickets from 2015 and some patches are still valid.

EDIT: messages from three hours ago are already out-of-view.
« Last Edit: December 22, 2021, 06:01:33 pm by Miguel Gimenez »