2023-06-24 GnuCash IRC logs

01:15:06 *** gandalf has joined #gnucash
01:18:51 *** fell has quit IRC
01:20:10 *** fell has joined #gnucash
01:20:10 *** ChanServ sets mode: +o fell
01:48:28 *** gour has joined #gnucash
01:48:28 *** ChanServ sets mode: +v gour
01:59:25 *** Aussie_matt has joined #gnucash
03:45:21 *** dazu has joined #gnucash
04:41:03 *** Aussie_matt has quit IRC
04:58:42 *** gjanssens has joined #gnucash
04:58:42 *** ChanServ sets mode: +o gjanssens
05:11:57 * Simon tries running scan-build on yesterday's stable version
05:12:25 <Simon> I feel like this is something a compiler should be able to detect, especially as all the code is in the same file
05:16:27 *** bertbob has quit IRC
05:20:42 *** bertbob has joined #gnucash
05:20:42 *** ChanServ sets mode: +v bertbob
05:21:50 *** gour has quit IRC
05:23:21 * Simon generates gnc-vcs-info.h and waits another 7+ minutes
05:23:41 <Simon> it has found 45 bugs so far in the files that don't include gnc-vcs-info.h
05:24:29 <Simon> cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=YES
05:24:36 *** gour has joined #gnucash
05:24:36 *** ChanServ sets mode: +v gour
05:24:38 <Simon> ninja # to create gnc-vcs-info.sh
05:24:41 <Simon> analyze-build --cdb compile_commands.json --output out
05:25:13 <Simon> I want it to find the window dereference bug but I can't really spend time on any of the others
05:35:50 <Simon> annoyingly it hasn't found it :|
05:37:10 <Simon> presumably because gnc_main_window_get_instance_private() is a macro
05:38:00 <Simon> it has found 89 other bugs though
05:38:53 <Simon> although some of those may be nonsense
05:40:40 <Simon> yes... it doesn't understand "g_value_take_boxed (dest, guid);"
05:44:09 <Simon> there's at least one potential memory leak (in an unlikely error path) and one use after free (in the test code)
06:44:22 *** gandalf has quit IRC
06:44:37 *** gandalf has joined #gnucash
07:05:19 <Simon> "If G_DISABLE_CHECKS is defined then the check is not performed. You should therefore not depend on any side effects of expr ."
07:05:39 <Simon> using g_return_val_if_fail() for null pointer checks doesn't make any sense at all
07:16:52 <Simon> not quite sure why set_spl_gnc_num() is unconditionally returning false but I'll change that
07:37:37 <Simon> for (auto parent = ACCT_TYPE_NONE; parent < ACCT_TYPE_LAST; ++parent)
07:37:39 <Simon> if (1 << parent & compat)
07:38:15 <Simon> that only works because parent (-1 aka 0x80000000) won't match any of compat so it becomes 1 << 0
07:38:50 <Simon> checking parent != ACCT_TYPE_NONE might stop it complaining because it should be able to tell that it's never negative
08:03:57 <Simon> the "placeholder" variable in dialog-account-picker.c:dialog_response_cb() may be uninitialised... the compiler should already be catching this
08:14:34 <Simon> https://github.com/nomis/gnucash/compare/sa...nomis:gnucash:static-analysis still a work in progress...
08:16:22 <Simon> created https://bugs.gnucash.org/show_bug.cgi?id=798966 because I don't know what to initialise it to to get the right behaviour
09:25:34 *** Aussie_matt has joined #gnucash
10:59:43 *** Aussie_matt has quit IRC
11:08:22 *** gandalf has quit IRC
11:34:46 *** jervin has joined #gnucash
11:52:41 *** jervin has quit IRC
12:03:04 *** palerider has joined #gnucash
12:03:27 *** palerider has left #gnucash
13:43:27 *** dazu has quit IRC
13:47:36 *** mosiu has joined #gnucash
14:09:45 *** jervin has joined #gnucash
15:58:41 *** gandalf has joined #gnucash
16:00:18 *** gour has quit IRC
16:07:19 *** gandalf has quit IRC
16:27:39 <jralls> Simon, -1 in two's complement is 0xffffffff not 0x80000000; the latter is INT32_MIN. See https://en.wikipedia.org/wiki/Two%27s_complement.
16:41:15 *** miklcct has quit IRC
16:46:00 *** miklcct has joined #gnucash
16:46:00 *** ChanServ sets mode: +v miklcct
17:03:59 <Simon> I'll update the commit message
17:04:09 <Simon> oh you've merged it already
17:04:44 <Simon> what it's actually doing then is checking it matches an invalid account type for "NONE", which is false
17:05:07 <Simon> but that would fail the test...
17:06:50 <Simon> ((1 << -1) & compat) is probably (0 & compat)
17:07:47 <Simon> yes, 1 << -1 is 0
17:09:39 <Simon> it was never 1 << (-1 & compat), which is why I added parenthesis because combining those is prone to confusion
17:36:08 *** NoobAlice has joined #gnucash
18:03:47 *** gjanssens has quit IRC
18:05:04 *** gjanssens has joined #gnucash
18:05:04 *** ChanServ sets mode: +o gjanssens
18:54:09 *** mydogsnameisrudy has joined #gnucash
20:04:02 *** gjanssens has quit IRC
20:48:45 <jralls> warlord, The ovirt server says the windows VM is down and puts up a ⃠ cursor on the run button.
21:59:36 *** jervin has quit IRC
22:02:45 *** mosiu_ has joined #gnucash
22:02:59 *** mosiu has quit IRC
22:02:59 *** mosiu_ is now known as mosiu
22:38:52 *** Aussie_matt has joined #gnucash