Re: New Defects reported by Coverity Scan for LyX

2024-09-30 Thread Jean-Marc Lasgouttes
Le 30/09/2024 à 17:35, Jürgen Spitzmüller a écrit : Am Montag, dem 30.09.2024 um 15:06 +0200 schrieb Jean-Marc Lasgouttes: Thanks for walking me through the testing. It (still) works, so I pushed this. Thanks. I only bothered you with this since I was away from my machine. Now I can re-run B

Re: New Defects reported by Coverity Scan for LyX

2024-09-30 Thread Jürgen Spitzmüller
Am Montag, dem 30.09.2024 um 15:06 +0200 schrieb Jean-Marc Lasgouttes: > Thanks for walking me through the testing. It (still) works, so I > pushed this. Thanks. I only bothered you with this since I was away from my machine. -- Jürgen -- lyx-devel mailing list lyx-devel@lists.lyx.org http://li

Re: New Defects reported by Coverity Scan for LyX

2024-09-30 Thread Jean-Marc Lasgouttes
Le 30/09/2024 à 09:13, Jürgen Spitzmüller a écrit : * Add a local bib file in the Bib(la)TeX dialog * Select this entry in the selected bibs widget and press "Make Absolute" or "Make Relative" (depending on what the button text displays, which should reflect the current state) * If the path togg

Re: New Defects reported by Coverity Scan for LyX

2024-09-30 Thread Jürgen Spitzmüller
Jean-Marc Lasgouttes schrieb am 29.09.2024 21:47 (GMT +02:00): > Jürgen, it seems to me that it is possible to modify the string in place > instead of duplicating the list. That's certainly better. > I the patch below correct? I do not > know how to test it. * Add a local bib file in the Bib(

Re: New Defects reported by Coverity Scan for LyX

2024-09-29 Thread Jean-Marc Lasgouttes
Le 26/09/2024 à 17:08, scan-ad...@coverity.com a écrit : *** CID 445094: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /home/lasgoutt/src/lyx/coverity/lyx/src/frontends/qt/GuiBibtex.cpp: 327 in lyx::frontend::GuiBibtex::relAbsPressed()() 321 for (QString s : selected_bibs_) { 3

Re: Fwd: New Defects reported by Coverity Scan for LyX

2023-11-22 Thread Jürgen Spitzmüller
Am Mittwoch, dem 22.11.2023 um 17:48 +0100 schrieb Jean-Marc Lasgouttes: > But 300 new defects is a bit more than I expected :) Yes, this scared me, too. -- Jürgen -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel

Fwd: New Defects reported by Coverity Scan for LyX

2023-11-22 Thread Jean-Marc Lasgouttes
sense to me. Does it make sense to you? Note that there are other reports that may be useful. But 300 new defects is a bit more than I expected :) JMarc Message transféré Sujet : New Defects reported by Coverity Scan for LyX Date : Wed, 22 Nov 2023 16:26:32 + (UTC) De : scan

Re: Fwd: New Defects reported by Coverity Scan for LyX

2023-10-26 Thread Jürgen Spitzmüller
Am Donnerstag, dem 26.10.2023 um 03:44 +0200 schrieb Thibaut Cuvelier: > Dear list, > > I am attaching a patch that fixes two Coverity warnings. Could anyone > commit this to the Git repo (given I currently have no access to it)? > As it was generated with git format-patch, it should be easy to do

Fwd: New Defects reported by Coverity Scan for LyX

2023-10-25 Thread Thibaut Cuvelier
-- Forwarded message - From: Thibaut Cuvelier Date: Thu, 26 Oct 2023, 03:35 Subject: Fwd: New Defects reported by Coverity Scan for LyX To: LyX Developers Dear list, I am attaching a patch that fixes two Coverity warnings. Could anyone commit this to the Git repo (given I

Re: New Defects reported by Coverity Scan for LyX

2021-10-29 Thread Thibaut Cuvelier
On Fri, 29 Oct 2021 at 21:53, Jean-Marc Lasgouttes wrote: > Le 29/10/2021 à 21:37, Thibaut Cuvelier a écrit : > > Dear list, > > > > I've just received this report. However, the dereferencing has been > > taken care of within a LASSERT. What do you suggest I do? It would be > > best to avoid that

Re: New Defects reported by Coverity Scan for LyX

2021-10-29 Thread Jean-Marc Lasgouttes
Le 29/10/2021 à 21:37, Thibaut Cuvelier a écrit : Dear list, I've just received this report. However, the dereferencing has been taken care of within a LASSERT. What do you suggest I do? It would be best to avoid that this report comes again, so I think something must be done. Hello Thibaut

Re: New Defects reported by Coverity Scan for LyX

2021-10-29 Thread Thibaut Cuvelier
Dear list, I've just received this report. However, the dereferencing has been taken care of within a LASSERT. What do you suggest I do? It would be best to avoid that this report comes again, so I think something must be done. The least clean option seems to unroll the macro in the code (calling

Re: New Defects reported by Coverity Scan for LyX

2020-08-25 Thread Stephan Witt
Am 25.08.2020 um 11:40 schrieb Jean-Marc Lasgouttes : > > Le 25/08/2020 à 11:06, Stephan Witt a écrit : >> Next patch is the real change for #6401. I’d like to apply it soon. Any >> objections or possible improvements? > > It is difficult to understand what it does by reading it, and your commit

Re: New Defects reported by Coverity Scan for LyX

2020-08-25 Thread Jean-Marc Lasgouttes
Le 25/08/2020 à 11:06, Stephan Witt a écrit : Next patch is the real change for #6401. I’d like to apply it soon. Any objections or possible improvements? It is difficult to understand what it does by reading it, and your commit log does not help much! JMarc -- lyx-devel mailing list lyx-de

Re: New Defects reported by Coverity Scan for LyX

2020-08-25 Thread Stephan Witt
Am 25.08.2020 um 10:41 schrieb Jean-Marc Lasgouttes : > > Le 25/08/2020 à 07:17, Stephan Witt a écrit : >>> I would propose to either define Inset::asInsetBibitem() and use that, or >>> rely only on dynamic_cast. But it is not necessary to rely on inset code >>> IMO (I try to reduce the amount o

Re: New Defects reported by Coverity Scan for LyX

2020-08-25 Thread Jean-Marc Lasgouttes
Le 25/08/2020 à 02:16, Thibaut Cuvelier a écrit : I've just pushed a pash for this on my development branch; here it is for inclusion (you were right about the missing index…). All your solutions seem like design decisions that should be taken once and for all (e.g., get rid of lyxCode and asIns

Re: New Defects reported by Coverity Scan for LyX

2020-08-25 Thread Jean-Marc Lasgouttes
Le 25/08/2020 à 07:17, Stephan Witt a écrit : I would propose to either define Inset::asInsetBibitem() and use that, or rely only on dynamic_cast. But it is not necessary to rely on inset code IMO (I try to reduce the amount of such code uses, but they creep back relentlessly :). So, this pat

Re: New Defects reported by Coverity Scan for LyX

2020-08-24 Thread Stephan Witt
> Am 24.08.2020 um 17:39 schrieb Jean-Marc Lasgouttes : > > Le 24/08/2020 à 12:16, scan-ad...@coverity.com a écrit : >> Hi, >> Please find the latest report on new defect(s) introduced to LyX found with >> Coverity Scan. >> 2 new defect(s) introduced to LyX found with Coverity Scan. >> 1 defect(s

Re: New Defects reported by Coverity Scan for LyX

2020-08-24 Thread Thibaut Cuvelier
On Mon, 24 Aug 2020 at 17:40, Jean-Marc Lasgouttes wrote: > Le 24/08/2020 à 12:16, scan-ad...@coverity.com a écrit : > > Hi, > > > > Please find the latest report on new defect(s) introduced to LyX found > with Coverity Scan. > > > > 2 new defect(s) introduced to LyX found with Coverity Scan. > >

Re: New Defects reported by Coverity Scan for LyX

2020-08-24 Thread Jean-Marc Lasgouttes
Le 24/08/2020 à 12:16, scan-ad...@coverity.com a écrit : Hi, Please find the latest report on new defect(s) introduced to LyX found with Coverity Scan. 2 new defect(s) introduced to LyX found with Coverity Scan. 1 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent b

Re: New Defects reported by Coverity Scan for LyX

2020-07-19 Thread Thibaut Cuvelier
On Sun, 19 Jul 2020 at 11:48, Pavel Sanda wrote: > On Wed, Jul 08, 2020 at 03:38:06PM +0200, Jean-Marc Lasgouttes wrote: > > Le 08/07/2020 ? 15:32, Kornel Benko a écrit : > > > I wonder why the use of std::regex_match()? > > > > > > We use > > > #include "support/regex.h" > > > the correct is

Re: New Defects reported by Coverity Scan for LyX

2020-07-19 Thread Kornel Benko
Am Sun, 19 Jul 2020 11:47:55 +0200 schrieb Pavel Sanda : > On Wed, Jul 08, 2020 at 03:38:06PM +0200, Jean-Marc Lasgouttes wrote: > > Le 08/07/2020 ? 15:32, Kornel Benko a écrit : > > > I wonder why the use of std::regex_match()? > > > > > > We use > > > #include "support/regex.h" > > > the co

Re: New Defects reported by Coverity Scan for LyX

2020-07-19 Thread Pavel Sanda
On Wed, Jul 08, 2020 at 03:38:06PM +0200, Jean-Marc Lasgouttes wrote: > Le 08/07/2020 ? 15:32, Kornel Benko a écrit : > > I wonder why the use of std::regex_match()? > > > > We use > > #include "support/regex.h" > > the correct is either > > lyx::regex_match() > > or > > regex_match()

Re: New Defects reported by Coverity Scan for LyX

2020-07-09 Thread Jean-Marc Lasgouttes
Le 09/07/2020 à 02:42, Thibaut Cuvelier a écrit : On Wed, 8 Jul 2020 at 14:54, Jean-Marc Lasgouttes > wrote: Item 1 is about checking return of regex_match Item 2 is probably fixed by an earlier definition of the "label" variable Here are two patches, on

Re: New Defects reported by Coverity Scan for LyX

2020-07-08 Thread Thibaut Cuvelier
On Wed, 8 Jul 2020 at 14:54, Jean-Marc Lasgouttes wrote: > Item 1 is about checking return of regex_match > > Item 2 is probably fixed by an earlier definition of the "label" variable > Here are two patches, one per item. I also included Kornel's comment about std::regex_match. 0001-Update-REL

Re: Fwd: New Defects reported by Coverity Scan for LyX

2020-07-08 Thread Richard Kimberly Heck
On 7/8/20 11:28 AM, Jean-Marc Lasgouttes wrote: > Le 08/07/2020 à 14:53, Jean-Marc Lasgouttes a écrit : >> Hello, >> >> More work for Thibaut :) I ran coverity against master and here is >> what it returns (below). > > Now I tried clang 10 and I get the following 2 warnings. Besides the > overloadi

Re: Fwd: New Defects reported by Coverity Scan for LyX

2020-07-08 Thread Jean-Marc Lasgouttes
Le 08/07/2020 à 14:53, Jean-Marc Lasgouttes a écrit : Hello, More work for Thibaut :) I ran coverity against master and here is what it returns (below). Now I tried clang 10 and I get the following 2 warnings. Besides the overloading problem, the indentation issue seems to be related with th

Re: New Defects reported by Coverity Scan for LyX

2020-07-08 Thread Jean-Marc Lasgouttes
Le 08/07/2020 à 15:32, Kornel Benko a écrit : I wonder why the use of std::regex_match()? We use #include "support/regex.h" the correct is either lyx::regex_match() or regex_match() in the lyx namespace. Very good point. We use the second form in the source. JMarc --

Re: New Defects reported by Coverity Scan for LyX

2020-07-08 Thread Kornel Benko
Am Wed, 8 Jul 2020 14:53:49 +0200 schrieb Jean-Marc Lasgouttes : > >>> CID 360530: Error handling issues (CHECKED_RETURN) > >>> Calling "regex_match" without checking return value (as is done > >>> elsewhere 48 > >>> out of 49 times). > 1194 std::regex_match(t

Fwd: New Defects reported by Coverity Scan for LyX

2020-07-08 Thread Jean-Marc Lasgouttes
cannot do much about it IMO. The full dashboard is at https://scan.coverity.com/projects/lyx?tab=overview JMarc Message transféré -------- Sujet : New Defects reported by Coverity Scan for LyX Date : Wed, 08 Jul 2020 10:32:16 + (UTC) De : scan-ad...@coverity.com Pour : lasgout.

Re: New Defects reported by Coverity Scan for LyX

2019-02-18 Thread Jean-Marc Lasgouttes
Le 18/02/2019 à 15:04, scan-ad...@coverity.com a écrit : Hi, Please find the latest report on new defect(s) introduced to LyX found with Coverity Scan. 30 new defect(s) introduced to LyX found with Coverity Scan. 3 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent

Re: Fwd: New Defects reported by Coverity Scan for LyX

2017-03-14 Thread Jean-Marc Lasgouttes
Le 14/03/2017 à 14:39, Jean-Marc Lasgouttes a écrit : A good example of non-obvious report is this one: a2bfe004. Then there are the really tricky reports like Converters::convert where part of the code checks whether buffer is null, and the other part uses it without any check. JMarc

Re: Fwd: New Defects reported by Coverity Scan for LyX

2017-03-14 Thread Jean-Marc Lasgouttes
Le 13/03/2017 à 21:16, Pavel Sanda a écrit : Jean-Marc Lasgouttes wrote: Here are new defaults discovered by coverity. Guillaume, I think that they should all ring bells wrt your recent external modification code. Btw since you were working on coverity bugs for a while now, how many _real_ bug

Re: Fwd: New Defects reported by Coverity Scan for LyX

2017-03-13 Thread Pavel Sanda
Jean-Marc Lasgouttes wrote: > Here are new defaults discovered by coverity. Guillaume, I think that they > should all ring bells wrt your recent external modification code. Btw since you were working on coverity bugs for a while now, how many _real_ bugs have been found and what's the ratio to th

Fwd: New Defects reported by Coverity Scan for LyX

2017-03-13 Thread Jean-Marc Lasgouttes
Here are new defaults discovered by coverity. Guillaume, I think that they should all ring bells wrt your recent external modification code. JMarc Message transféré Sujet : New Defects reported by Coverity Scan for LyX Date : Mon, 13 Mar 2017 09:50:13 -0700 De : scan-ad